Romania (ro)¶
Forms¶
Romanian specific form helpers.
- class localflavor.ro.forms.ROCIFField(max_length=10, min_length=2, *args, **kwargs)[source]¶
A Romanian fiscal identity code (CIF) field
For CIF validation algorithm see http://www.validari.ro/cui.html
- class localflavor.ro.forms.ROCNPField(max_length=13, min_length=13, *args, **kwargs)[source]¶
A Romanian personal identity code (CNP) field
For CNP validation algorithm see http://www.validari.ro/cnp.html
- class localflavor.ro.forms.ROCountyField(required=True, widget=None, label=None, initial=None, help_text='', error_messages=None, show_hidden_initial=False, validators=, []localize=False)[source]¶
A form field that validates its input is a Romanian county name or abbreviation. It normalizes the input to the standard vehicle registration abbreviation for the given county
WARNING: This field will only accept names written with diacritics; consider using ROCountySelect if this behavior is unnaceptable for you
Example:
Argeş => valid Arges => invalid
- class localflavor.ro.forms.ROCountySelect(attrs=None)[source]¶
A Select widget that uses a list of Romanian counties (judete) as its choices.
- class localflavor.ro.forms.ROIBANField(*args, **kwargs)[source]¶
Romanian International Bank Account Number (IBAN) field
Changed in version 1.1: Validation error messages changed to the messages used in IBANFormField
Deprecated since version 1.1: Use IBANFormField with included_countries=(‘RO’,) option instead.
- class localflavor.ro.forms.ROPhoneNumberField(max_length=20, min_length=3, *args, **kwargs)[source]¶
Romanian phone number field
Changed in version 1.1: Made the field also accept national short phone numbers and 7-digit regional phone numbers besides the regular ones. Official documentation (in English): http://www.ancom.org.ro/en/pnn_1300 Official documentation (in Romanian): http://www.ancom.org.ro/pnn_1300
Data¶
- localflavor.ro.ro_counties.COUNTIES_CHOICES = (('AB', 'Alba'), ('AR', 'Arad'), ('AG', 'Argeş'), ('BC', 'Bacău'), ('BH', 'Bihor'), ('BN', 'Bistriţa-Năsăud'), ('BT', 'Botoşani'), ('BV', 'Braşov'), ('BR', 'Brăila'), ('B', 'Bucureşti'), ('BZ', 'Buzău'), ('CS', 'Caraş-Severin'), ('CL', 'Călăraşi'), ('CJ', 'Cluj'), ('CT', 'Constanţa'), ('CV', 'Covasna'), ('DB', 'Dâmboviţa'), ('DJ', 'Dolj'), ('GL', 'Galaţi'), ('GR', 'Giurgiu'), ('GJ', 'Gorj'), ('HR', 'Harghita'), ('HD', 'Hunedoara'), ('IL', 'Ialomiţa'), ('IS', 'Iaşi'), ('IF', 'Ilfov'), ('MM', 'Maramureş'), ('MH', 'Mehedinţi'), ('MS', 'Mureş'), ('NT', 'Neamţ'), ('OT', 'Olt'), ('PH', 'Prahova'), ('SM', 'Satu Mare'), ('SJ', 'Sălaj'), ('SB', 'Sibiu'), ('SV', 'Suceava'), ('TR', 'Teleorman'), ('TM', 'Timiş'), ('TL', 'Tulcea'), ('VS', 'Vaslui'), ('VL', 'Vâlcea'), ('VN', 'Vrancea'))¶
A list of Romanian counties as choices in a formfield.