Germany (de)

Forms

DE-specific Form helpers

class localflavor.de.forms.DEIdentityCardNumberField(required=True, widget=None, label=None, initial=None, help_text=u'', error_messages=None, show_hidden_initial=False, validators=[], localize=False)[source]

A German identity card number.

Checks the following rules to determine whether the number is valid:

  • Conforms to the XXXXXXXXXXX-XXXXXXX-XXXXXXX-X format.
  • No group consists entirely of zeroes.
  • Included checksums match calculated checksums

Algorithm is documented at http://de.wikipedia.org/wiki/Personalausweis

class localflavor.de.forms.DEStateSelect(attrs=None)[source]

A Select widget that uses a list of DE states as its choices.

class localflavor.de.forms.DEZipCodeField(max_length=None, min_length=None, *args, **kwargs)[source]

A form field that validates input as a German zip code. Valid codes consist of five digits.

Data

localflavor.de.de_states.STATE_CHOICES = (('BW', <django.utils.functional.__proxy__ object at 0x7f953f5c7110>), ('BY', <django.utils.functional.__proxy__ object at 0x7f953f5c7150>), ('BE', <django.utils.functional.__proxy__ object at 0x7f953f5c7b50>), ('BB', <django.utils.functional.__proxy__ object at 0x7f953f5c7b90>), ('HB', <django.utils.functional.__proxy__ object at 0x7f953f5c7e90>), ('HH', <django.utils.functional.__proxy__ object at 0x7f953f5c7ed0>), ('HE', <django.utils.functional.__proxy__ object at 0x7f953f5c7f50>), ('MV', <django.utils.functional.__proxy__ object at 0x7f953f5c7e10>), ('NI', <django.utils.functional.__proxy__ object at 0x7f953f5c7bd0>), ('NW', <django.utils.functional.__proxy__ object at 0x7f953f5c7e50>), ('RP', <django.utils.functional.__proxy__ object at 0x7f953f5c7c50>), ('SL', <django.utils.functional.__proxy__ object at 0x7f953f5c7c90>), ('SN', <django.utils.functional.__proxy__ object at 0x7f953f5c7cd0>), ('ST', <django.utils.functional.__proxy__ object at 0x7f953f5c7d50>), ('SH', <django.utils.functional.__proxy__ object at 0x7f953f5c7a90>), ('TH', <django.utils.functional.__proxy__ object at 0x7f953f5c78d0>))

An alphabetical list of states