Czech Republic (cz)

Forms

Czech-specific form helpers.

class localflavor.cz.forms.CZBirthNumberField(required=True, widget=None, label=None, initial=None, help_text='', error_messages=None, show_hidden_initial=False, validators=(), localize=False, disabled=False, label_suffix=None)[source]

Czech birth number form field.

class localflavor.cz.forms.CZICNumberField(required=True, widget=None, label=None, initial=None, help_text='', error_messages=None, show_hidden_initial=False, validators=(), localize=False, disabled=False, label_suffix=None)[source]

Czech IC number form field.

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

A form field that validates its input as Czech postal code.

Valid form is XXXXX or XXX XX, where X represents integer.

clean(value)[source]

Validates the input and returns a string that contains only numbers.

Returns an empty string for empty values.

class localflavor.cz.forms.CZRegionSelect(attrs=None)[source]

A select widget widget with list of Czech regions as choices.

Data

localflavor.cz.cz_regions.REGION_CHOICES = (('PR', 'Prague'), ('CE', 'Central Bohemian Region'), ('SO', 'South Bohemian Region'), ('PI', 'Pilsen Region'), ('CA', 'Carlsbad Region'), ('US', 'Usti Region'), ('LB', 'Liberec Region'), ('HK', 'Hradec Region'), ('PA', 'Pardubice Region'), ('VY', 'Vysocina Region'), ('SM', 'South Moravian Region'), ('OL', 'Olomouc Region'), ('ZL', 'Zlin Region'), ('MS', 'Moravian-Silesian Region'))

Czech regions, translations get from http://www.crwflags.com/fotw/Flags/cz-re.html