Django

Code

Ticket #6427 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

created localflavor.at

Reported by: Bela Hausmann <post@belahausmann.name> Assigned to: zerok
Milestone: Component: django.contrib.localflavor
Version: SVN Keywords: localflavor, austria
Cc: zerok@zerokspot.com Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

I created a basic localflavor for Austria (AT). For now only a Provinces Select and ZipCode? field.

Attachments

at_provinces.py (1.1 kB) - added by Bela Hausmann <post@belahausmann.name> on 01/20/08 10:15:38.
localflavor.at.at_provinces
forms.py (0.6 kB) - added by Bela Hausmann <post@belahausmann.name> on 01/20/08 10:16:19.
localflavor.at.forms
at_provinces.2.py (1.3 kB) - added by Bela Hausmann <post@belahausmann.name> on 05/09/08 02:17:19.
New version with english Names
locale.de.diff (29.9 kB) - added by Horst Gutmann <zerok@zerokspot.com> on 07/13/08 04:56:23.
Changes to the German locales
localflavor.at.diff (6.2 kB) - added by Horst Gutmann <zerok@zerokspot.com> on 07/13/08 04:56:52.
New localflavor.at
localflavor.at-2.diff (6.2 kB) - added by Horst Gutmann <zerok@zerokspot.com> on 07/19/08 01:31:03.
Some final changes to the documentation to clarify the origin of the whole SSN checker
localflavor.at-3.diff (6.2 kB) - added by Horst Gutmann <zerok@zerokspot.com> on 07/19/08 02:10:12.
Updated contrib/localflavor addition to the post-r7971 world
localflavor.at-4.diff (4.1 kB) - added by Horst Gutmann <zerok@zerokspot.com> on 07/27/08 10:52:08.
Updated patch for the post-r8087 world

Change History

01/20/08 10:15:38 changed by Bela Hausmann <post@belahausmann.name>

  • attachment at_provinces.py added.

localflavor.at.at_provinces

01/20/08 10:16:19 changed by Bela Hausmann <post@belahausmann.name>

  • attachment forms.py added.

localflavor.at.forms

01/20/08 10:21:18 changed by Bela Hausmann <post@belahausmann.name>

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

the utf8 upload didn't work, so here again at_provinces.py

# -*- coding: utf-8 -*-
"""
A list of all nine provinces in Austria, see also: http://en.wikipedia.org/wiki/ISO_3166-2:AT
In the comments there are their english names, if they are not the same as the german ones.
Vienna is moved to the top, because it's the capital of Austria
"""

from django.utils.translation import ugettext_lazy as _

# after ISO_3166-2
PROVINCE_CHOICES = (
	('9', _(u'Wien')),		# Vienna
	('1', _(u'Burgenland')),
	('2', _(u'Kärnten')),		# Carinthia
	('3', _(u'Niederösterreich')),	# Lower Austria
	('4', _(u'Oberösterreich')),	# Upper Austria
	('5', _(u'Salzburg')),
	('6', _(u'Steiermark')),	# Styria
	('7', _(u'Tirol')),		# Tyrol
	('8', _(u'Vorarlberg')),
)

# alternative keys using initials (not used in forms)
PROVINCE_CHOICES_INITIALS = (
	('W', _(u'Wien')),		# Vienna
	('B', _(u'Burgenland')),
	('K', _(u'Kärnten')),		# Carinthia
	('N', _(u'Niederösterreich')),	# Lower Austria
	('O', _(u'Oberösterreich')),	# Upper Austria
	('S', _(u'Salzburg')),
	('St', _(u'Steiermark')),	# Styria
	('T', _(u'Tirol')),		# Tyrol
	('V', _(u'Vorarlberg')),
)


01/21/08 11:37:24 changed by tvrg

  • has_patch set to 1.
  • needs_tests set to 1.

03/11/08 15:30:29 changed by jacob

  • stage changed from Unreviewed to Accepted.

05/08/08 14:27:24 changed by Horst Gutmann <zerok@zerokspot.com>

  • cc set to zerok@zerokspot.com.

Shouldn't normally the province name be stored here in English if translatable? At least that's how its done in the German and Swiss packages.

05/09/08 02:16:38 changed by Bela Hausmann <post@belahausmann.name>

Yes, I didn't notice that. Attached a new version.

05/09/08 02:17:19 changed by Bela Hausmann <post@belahausmann.name>

  • attachment at_provinces.2.py added.

New version with english Names

07/12/08 07:28:55 changed by Horst Gutmann <zerok@zerokspot.com>

  • owner changed from nobody to zerok.

07/13/08 04:55:34 changed by Horst Gutmann <zerok@zerokspot.com>

  • keywords changed from localflavor austria to localflavor, austria.
  • needs_tests deleted.

Removed some of Bela's lists since they are never used in the bundled forms.py and also added regression tests for all fields as well as a new field for handling Austrian social security numbers.

As requested by jezdez the result is split into two patches. One that includes the actual localflavor implementation, the other is for changes to the German locales.

07/13/08 04:56:23 changed by Horst Gutmann <zerok@zerokspot.com>

  • attachment locale.de.diff added.

Changes to the German locales

07/13/08 04:56:52 changed by Horst Gutmann <zerok@zerokspot.com>

  • attachment localflavor.at.diff added.

New localflavor.at

07/13/08 04:57:54 changed by Horst Gutmann <zerok@zerokspot.com>

I also contacted Bela to check if the removal of his 2 additional lists is OK for him. If he agrees this one would IMO be ready.

07/13/08 06:19:49 changed by Bela Hausmann <post@belahausmann.name>

It's fine by me!

07/19/08 01:31:03 changed by Horst Gutmann <zerok@zerokspot.com>

  • attachment localflavor.at-2.diff added.

Some final changes to the documentation to clarify the origin of the whole SSN checker

07/19/08 02:10:12 changed by Horst Gutmann <zerok@zerokspot.com>

  • attachment localflavor.at-3.diff added.

Updated contrib/localflavor addition to the post-r7971 world

07/27/08 10:52:08 changed by Horst Gutmann <zerok@zerokspot.com>

  • attachment localflavor.at-4.diff added.

Updated patch for the post-r8087 world

07/27/08 10:54:46 changed by Horst Gutmann <zerok@zerokspot.com>

localflavor.at-4.diff adds the ATSocialSecurityNumberField to Bernd's patch in #7686 and fixes some minor typos (as well as uses absolute imports).

This does *not* include any changes to the German locales, because there are other updates required in there as well that probably should be coordinated more closely with jezdez.

07/27/08 13:54:57 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [8113]) Fixed #6427 -- Added some more features to the Austrian localflavor. Thanks, Horst Gutmann.


Add/Change #6427 (created localflavor.at)




Change Properties
Action