Croatia (hr)

Forms

HR-specific Form helpers

class localflavor.hr.forms.HRCountySelect(attrs=None)[source]

A Select widget that uses a list of counties of Croatia as its choices.

class localflavor.hr.forms.HRJMBAGField(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]

Unique Master Academic Citizen Number of Croatia (JMBAG) field. This number is used by college students and professors in Croatia.

http://www.cap.srce.hr/IzgledX.aspx

class localflavor.hr.forms.HRJMBGField(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]

Unique Master Citizen Number (JMBG) field. The number is still in use in Croatia, but it is being replaced by OIB.

Source: http://en.wikipedia.org/wiki/Unique_Master_Citizen_Number

For who might be reimplementing: The “area” regular expression group is used to calculate the region where a person was registered. Additional validation can be implemented in accordance with it, however this could result in exclusion of legit immigrated citizens. Therefore, this field works for any ex-Yugoslavia country.

class localflavor.hr.forms.HRLicensePlateField(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]

Vehicle license plate of Croatia field. Normalizes to the specific format below. Suffix is constructed from the shared letters of the Croatian and English alphabets.

Format examples:
SB 123-A (but also supports more characters) ZG 1234-AA

Used for standardized license plates only.

class localflavor.hr.forms.HRLicensePlatePrefixSelect(attrs=None)[source]

A Select widget that uses a list of vehicle license plate prefixes of Croatia as its choices.

class localflavor.hr.forms.HROIBField(min_length=11, max_length=11, *args, **kwargs)[source]

Personal Identification Number of Croatia (OIB) field.

http://www.oib.hr/

class localflavor.hr.forms.HRPhoneNumberField(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]

Phone number of Croatia field. Format: Complete country code or leading zero, area code prefix, 6 or 7 digit number. Validates fixed, mobile and FGSM numbers. Normalizes to a full number with country code (+385 prefix).

class localflavor.hr.forms.HRPhoneNumberPrefixSelect(attrs=None)[source]

A Select widget that uses a list of phone number prefixes of Croatia as its choices.

class localflavor.hr.forms.HRPostalCodeField(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]

Postal code of Croatia field. It consists of exactly five digits ranging from 10000 to possibly less than 60000.

http://www.posta.hr/main.aspx?id=66

Data

localflavor.hr.hr_choices.HR_COUNTY_CHOICES = (('GZG', 'Grad Zagreb'), ('BBŽ', 'Bjelovarsko-bilogorska županija'), ('BPŽ', 'Brodsko-posavska županija'), ('DNŽ', 'Dubrovačko-neretvanska županija'), ('IŽ', 'Istarska županija'), ('KŽ', 'Karlovačka županija'), ('KKŽ', 'Koprivničko-križevačka županija'), ('KZŽ', 'Krapinsko-zagorska županija'), ('LSŽ', 'Ličko-senjska županija'), ('MŽ', 'Međimurska županija'), ('OBŽ', 'Osječko-baranjska županija'), ('PSŽ', 'Požeško-slavonska županija'), ('PGŽ', 'Primorsko-goranska županija'), ('SMŽ', 'Sisačko-moslavačka županija'), ('SDŽ', 'Splitsko-dalmatinska županija'), ('ŠKŽ', 'Šibensko-kninska županija'), ('VŽ', 'Varaždinska županija'), ('VPŽ', 'Virovitičko-podravska županija'), ('VSŽ', 'Vukovarsko-srijemska županija'), ('ZDŽ', 'Zadarska županija'), ('ZGŽ', 'Zagrebačka županija'))

Croatian Counties: http://en.wikipedia.org/wiki/ISO_3166-2:HR Croatia doesn’t have official abbreviations for counties. The ones provided are in common use.

localflavor.hr.hr_choices.HR_LICENSE_PLATE_PREFIX_CHOICES = (('BJ', 'BJ'), ('BM', 'BM'), ('ČK', 'ČK'), ('DA', 'DA'), ('DE', 'DE'), ('DJ', 'DJ'), ('DU', 'DU'), ('GS', 'GS'), ('IM', 'IM'), ('KA', 'KA'), ('KC', 'KC'), ('KR', 'KR'), ('KT', 'KT'), ('KŽ', 'KŽ'), ('MA', 'MA'), ('NA', 'NA'), ('NG', 'NG'), ('OG', 'OG'), ('OS', 'OS'), ('PU', 'PU'), ('PŽ', 'PŽ'), ('RI', 'RI'), ('SB', 'SB'), ('SK', 'SK'), ('SL', 'SL'), ('ST', 'ST'), ('ŠI', 'ŠI'), ('VK', 'VK'), ('VT', 'VT'), ('VU', 'VU'), ('VŽ', 'VŽ'), ('ZD', 'ZD'), ('ZG', 'ZG'), ('ŽU', 'ŽU'))

Only common license plate prefixes are provided. Special cases and obsolete prefixes are omitted. http://hr.wikipedia.org/wiki/Dodatak:Popis_registracijskih_oznaka_za_cestovna_vozila_u_Hrvatskoj

localflavor.hr.hr_choices.HR_PHONE_NUMBER_PREFIX_CHOICES = (('1', '01'), ('20', '020'), ('21', '021'), ('22', '022'), ('23', '023'), ('31', '031'), ('32', '032'), ('33', '033'), ('34', '034'), ('35', '035'), ('40', '040'), ('42', '042'), ('43', '043'), ('44', '044'), ('47', '047'), ('48', '048'), ('49', '049'), ('51', '051'), ('52', '052'), ('53', '053'), ('91', '091'), ('92', '092'), ('95', '095'), ('97', '097'), ('98', '098'), ('99', '099'))

The list includes county and cellular network phone number prefixes.