Ukraine (ua)

Forms

class localflavor.ua.forms.UAPostalCodeField(*args, **kwargs)[source]

A form field that validates input as a Ukrainian postal code.

Valid format is XXXXX. Note: first two numbers cannot be ‘00’.

Whitespace around a postal code is accepted and automatically trimmed.

New in version 1.5.

class localflavor.ua.forms.UARegionSelect(*args, **kwargs)[source]

A Select widget that uses a list of Ukrainian regions as its choices.

New in version 1.5.

class localflavor.ua.forms.UAVatNumberField(*args, **kwargs)[source]

A form field that validates input as a Ukrainian analog of a VAT number.

Valid format is XXXXXXXXXX.

Whitespace around a VAT number is accepted and automatically trimmed.

New in version 1.5.

Models

class localflavor.ua.models.UAPostalCodeField(*args, **kwargs)[source]

A model field which stores a Ukrainian postal code.

This field is represented by forms as a UAPostalCodeField field.

New in version 1.5.

class localflavor.ua.models.UARegionField(*args, **kwargs)[source]

A model field which stores a Ukrainian region.

This field is represented by forms as a UARegionSelect field.

New in version 1.5.

class localflavor.ua.models.UAVatNumberField(*args, **kwargs)[source]

A model field which stores a Ukrainian analog of a VAT number.

This field is represented by forms as a UAVatNumberField field.

New in version 1.5.

Data

localflavor.ua.ua_regions.UA_REGION_CHOICES = (('UA-71', 'Cherkasy Oblast'), ('UA-74', 'Chernihiv Oblast'), ('UA-77', 'Chernivtsi Oblast'), ('UA-12', 'Dnipropetrovsk Oblast'), ('UA-14', 'Donetsk Oblast'), ('UA-26', 'Ivano-Frankivsk Oblast'), ('UA-63', 'Kharkiv Oblast'), ('UA-65', 'Kherson Oblast'), ('UA-68', 'Khmelnytskyi Oblast'), ('UA-35', 'Kirovohrad Oblast'), ('UA-32', 'Kiev Oblast'), ('UA-09', 'Luhansk Oblast'), ('UA-46', 'Lviv Oblast'), ('UA-48', 'Mykolaiv Oblast'), ('UA-51', 'Odessa Oblast'), ('UA-53', 'Poltava Oblast'), ('UA-56', 'Rivne Oblast'), ('UA-59', 'Sumy Oblast'), ('UA-61', 'Ternopil Oblast'), ('UA-05', 'Vinnytsia Oblast'), ('UA-07', 'Volyn Oblast'), ('UA-21', 'Zakarpattia Oblast'), ('UA-23', 'Zaporizhia Oblast'), ('UA-18', 'Zhytomyr Oblast'), ('UA-43', 'Autonomous Republic of Crimea'), ('UA-30', 'Kiev'), ('UA-40', 'Sevastopol'))

24 oblasts, Avtonomna Respublika Krym and 2 cities with special status