2008-08-23 22:25:40 +00:00
|
|
|
==========================
|
|
|
|
The "local flavor" add-ons
|
|
|
|
==========================
|
|
|
|
|
|
|
|
.. module:: django.contrib.localflavor
|
|
|
|
:synopsis: A collection of various Django snippets that are useful only for
|
|
|
|
a particular country or culture.
|
|
|
|
|
|
|
|
Following its "batteries included" philosophy, Django comes with assorted
|
|
|
|
pieces of code that are useful for particular countries or cultures. These are
|
|
|
|
called the "local flavor" add-ons and live in the
|
|
|
|
:mod:`django.contrib.localflavor` package.
|
|
|
|
|
|
|
|
Inside that package, country- or culture-specific code is organized into
|
|
|
|
subpackages, named using `ISO 3166 country codes`_.
|
|
|
|
|
|
|
|
Most of the ``localflavor`` add-ons are localized form components deriving
|
2010-08-19 19:27:44 +00:00
|
|
|
from the :doc:`forms </topics/forms/index>` framework -- for example, a
|
2008-08-23 22:25:40 +00:00
|
|
|
:class:`~django.contrib.localflavor.us.forms.USStateField` that knows how to
|
|
|
|
validate U.S. state abbreviations, and a
|
|
|
|
:class:`~django.contrib.localflavor.fi.forms.FISocialSecurityNumber` that
|
|
|
|
knows how to validate Finnish social security numbers.
|
|
|
|
|
|
|
|
To use one of these localized components, just import the relevant subpackage.
|
|
|
|
For example, here's how you can create a form with a field representing a
|
|
|
|
French telephone number::
|
|
|
|
|
|
|
|
from django import forms
|
2008-08-30 05:39:34 +00:00
|
|
|
from django.contrib.localflavor.fr.forms import FRPhoneNumberField
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
class MyForm(forms.Form):
|
2008-08-30 05:39:34 +00:00
|
|
|
my_french_phone_no = FRPhoneNumberField()
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
Supported countries
|
|
|
|
===================
|
|
|
|
|
|
|
|
Countries currently supported by :mod:`~django.contrib.localflavor` are:
|
|
|
|
|
2011-10-10 17:32:33 +00:00
|
|
|
* Argentina_
|
|
|
|
* Australia_
|
|
|
|
* Austria_
|
|
|
|
* Belgium_
|
|
|
|
* Brazil_
|
|
|
|
* Canada_
|
|
|
|
* Chile_
|
|
|
|
* China_
|
|
|
|
* Colombia_
|
|
|
|
* Croatia_
|
|
|
|
* Czech_
|
|
|
|
* Ecuador_
|
|
|
|
* Finland_
|
|
|
|
* France_
|
|
|
|
* Germany_
|
2012-04-09 17:25:02 +00:00
|
|
|
* `Hong Kong`_
|
2011-10-10 17:32:33 +00:00
|
|
|
* Iceland_
|
|
|
|
* India_
|
|
|
|
* Indonesia_
|
|
|
|
* Ireland_
|
|
|
|
* Israel_
|
|
|
|
* Italy_
|
|
|
|
* Japan_
|
|
|
|
* Kuwait_
|
|
|
|
* Macedonia_
|
|
|
|
* Mexico_
|
|
|
|
* `The Netherlands`_
|
|
|
|
* Norway_
|
|
|
|
* Peru_
|
|
|
|
* Poland_
|
|
|
|
* Portugal_
|
|
|
|
* Paraguay_
|
|
|
|
* Romania_
|
|
|
|
* Russia_
|
|
|
|
* Slovakia_
|
|
|
|
* Slovenia_
|
|
|
|
* `South Africa`_
|
|
|
|
* Spain_
|
|
|
|
* Sweden_
|
|
|
|
* Switzerland_
|
|
|
|
* Turkey_
|
|
|
|
* `United Kingdom`_
|
|
|
|
* `United States of America`_
|
|
|
|
* Uruguay_
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
The ``django.contrib.localflavor`` package also includes a ``generic`` subpackage,
|
2009-03-22 16:13:06 +00:00
|
|
|
containing useful code that is not specific to one particular country or culture.
|
|
|
|
Currently, it defines date, datetime and split datetime input fields based on
|
2010-08-19 19:27:44 +00:00
|
|
|
those from :doc:`forms </topics/forms/index>`, but with non-US default formats.
|
2008-08-23 22:25:40 +00:00
|
|
|
Here's an example of how to use them::
|
|
|
|
|
|
|
|
from django import forms
|
|
|
|
from django.contrib.localflavor import generic
|
|
|
|
|
|
|
|
class MyForm(forms.Form):
|
|
|
|
my_date_field = generic.forms.DateField()
|
|
|
|
|
2012-06-28 08:49:07 +00:00
|
|
|
.. _ISO 3166 country codes: http://www.iso.org/iso/country_codes.htm
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _Argentina: `Argentina (ar)`_
|
|
|
|
.. _Australia: `Australia (au)`_
|
|
|
|
.. _Austria: `Austria (at)`_
|
2010-10-11 23:35:23 +00:00
|
|
|
.. _Belgium: `Belgium (be)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _Brazil: `Brazil (br)`_
|
|
|
|
.. _Canada: `Canada (ca)`_
|
|
|
|
.. _Chile: `Chile (cl)`_
|
2011-04-22 12:02:38 +00:00
|
|
|
.. _China: `China (cn)`_
|
2011-07-29 09:41:14 +00:00
|
|
|
.. _Colombia: `Colombia (co)`_
|
2011-04-22 12:03:42 +00:00
|
|
|
.. _Croatia: `Croatia (hr)`_
|
2009-02-22 07:51:57 +00:00
|
|
|
.. _Czech: `Czech (cz)`_
|
2011-07-29 09:41:14 +00:00
|
|
|
.. _Ecuador: `Ecuador (ec)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _Finland: `Finland (fi)`_
|
|
|
|
.. _France: `France (fr)`_
|
|
|
|
.. _Germany: `Germany (de)`_
|
2012-04-09 17:25:02 +00:00
|
|
|
.. _Hong Kong: `Hong Kong (hk)`_
|
2008-12-07 03:42:25 +00:00
|
|
|
.. _The Netherlands: `The Netherlands (nl)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _Iceland: `Iceland (is\_)`_
|
|
|
|
.. _India: `India (in\_)`_
|
2010-01-01 21:34:50 +00:00
|
|
|
.. _Indonesia: `Indonesia (id)`_
|
2010-01-01 21:33:00 +00:00
|
|
|
.. _Ireland: `Ireland (ie)`_
|
2010-10-15 02:58:10 +00:00
|
|
|
.. _Israel: `Israel (il)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _Italy: `Italy (it)`_
|
|
|
|
.. _Japan: `Japan (jp)`_
|
2010-01-01 21:32:24 +00:00
|
|
|
.. _Kuwait: `Kuwait (kw)`_
|
2011-06-12 13:31:40 +00:00
|
|
|
.. _Macedonia: `Macedonia (mk)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _Mexico: `Mexico (mx)`_
|
|
|
|
.. _Norway: `Norway (no)`_
|
2011-06-28 10:17:23 +00:00
|
|
|
.. _Paraguay: `Paraguay (py)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _Peru: `Peru (pe)`_
|
|
|
|
.. _Poland: `Poland (pl)`_
|
2010-01-01 21:35:26 +00:00
|
|
|
.. _Portugal: `Portugal (pt)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _Romania: `Romania (ro)`_
|
2011-04-22 12:03:30 +00:00
|
|
|
.. _Russia: `Russia (ru)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _Slovakia: `Slovakia (sk)`_
|
2011-08-28 13:51:28 +00:00
|
|
|
.. _Slovenia: `Slovenia (si)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _South Africa: `South Africa (za)`_
|
|
|
|
.. _Spain: `Spain (es)`_
|
2009-12-22 21:10:40 +00:00
|
|
|
.. _Sweden: `Sweden (se)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _Switzerland: `Switzerland (ch)`_
|
2010-12-04 05:25:24 +00:00
|
|
|
.. _Turkey: `Turkey (tr)`_
|
2011-05-03 11:52:20 +00:00
|
|
|
.. _United Kingdom: `United Kingdom (gb)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _United States of America: `United States of America (us)`_
|
2010-01-01 21:31:47 +00:00
|
|
|
.. _Uruguay: `Uruguay (uy)`_
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2011-04-28 00:20:10 +00:00
|
|
|
Internationalization of localflavor
|
|
|
|
===================================
|
|
|
|
|
|
|
|
Localflavor has its own catalog of translations, in the directory
|
|
|
|
``django/contrib/localflavor/locale``, and it's not loaded automatically like
|
|
|
|
Django's general catalog in ``django/conf/locale``. If you want localflavor's
|
|
|
|
texts to be translated, like form fields error messages, you must include
|
|
|
|
:mod:`django.contrib.localflavor` in the :setting:`INSTALLED_APPS` setting, so
|
|
|
|
the internationalization system can find the catalog, as explained in
|
2011-10-22 17:17:57 +00:00
|
|
|
:ref:`how-django-discovers-translations`.
|
2011-04-28 00:20:10 +00:00
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Adding flavors
|
|
|
|
==============
|
|
|
|
|
|
|
|
We'd love to add more of these to Django, so please `create a ticket`_ with
|
|
|
|
any code you'd like to contribute. One thing we ask is that you please use
|
|
|
|
Unicode objects (``u'mystring'``) for strings, rather than setting the encoding
|
|
|
|
in the file. See any of the existing flavors for examples.
|
|
|
|
|
2012-06-28 08:49:07 +00:00
|
|
|
.. _create a ticket: https://code.djangoproject.com/newticket
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2010-11-01 00:52:58 +00:00
|
|
|
Localflavor and backwards compatibility
|
|
|
|
=======================================
|
|
|
|
|
|
|
|
As documented in our :ref:`API stability
|
|
|
|
<misc-api-stability-localflavor>` policy, Django will always attempt
|
|
|
|
to make :mod:`django.contrib.localflavor` reflect the officially
|
|
|
|
gazetted policies of the appropriate local government authority. For
|
|
|
|
example, if a government body makes a change to add, alter, or remove
|
|
|
|
a province (or state, or county), that change will be reflected in
|
|
|
|
Django's localflavor in the next stable Django release.
|
|
|
|
|
|
|
|
When a backwards-incompatible change is made (for example, the removal
|
|
|
|
or renaming of a province) the localflavor in question will raise a
|
|
|
|
warning when that localflavor is imported. This provides a runtime
|
|
|
|
indication that something may require attention.
|
|
|
|
|
|
|
|
However, once you have addressed the backwards compatibility (for
|
|
|
|
example, auditing your code to see if any data migration is required),
|
|
|
|
the warning serves no purpose. The warning can then be supressed.
|
|
|
|
For example, to suppress the warnings raised by the Indonesian
|
|
|
|
localflavor you would use the following code::
|
|
|
|
|
|
|
|
import warnings
|
|
|
|
warnings.filterwarnings('ignore',
|
|
|
|
category=RuntimeWarning,
|
|
|
|
module='django.contrib.localflavor.id')
|
|
|
|
from django.contrib.localflavor.id import forms as id_forms
|
|
|
|
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Argentina (``ar``)
|
|
|
|
=============================================
|
|
|
|
|
|
|
|
.. class:: ar.forms.ARPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates input as either a classic four-digit Argentinian
|
|
|
|
postal code or a CPA_.
|
|
|
|
|
|
|
|
.. _CPA: http://www.correoargentino.com.ar/consulta_cpa/home.php
|
|
|
|
|
|
|
|
.. class:: ar.forms.ARDNIField
|
|
|
|
|
|
|
|
A form field that validates input as a Documento Nacional de Identidad (DNI)
|
|
|
|
number.
|
|
|
|
|
|
|
|
.. class:: ar.forms.ARCUITField
|
|
|
|
|
|
|
|
A form field that validates input as a Codigo Unico de Identificacion
|
|
|
|
Tributaria (CUIT) number.
|
|
|
|
|
|
|
|
.. class:: ar.forms.ARProvinceSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Argentina's provinces and autonomous
|
|
|
|
cities as its choices.
|
|
|
|
|
|
|
|
Australia (``au``)
|
|
|
|
=============================================
|
|
|
|
|
2011-04-22 12:03:30 +00:00
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
.. class:: au.forms.AUPostCodeField
|
|
|
|
|
|
|
|
A form field that validates input as an Australian postcode.
|
|
|
|
|
|
|
|
.. class:: au.forms.AUPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as an Australian phone number. Valid numbers
|
|
|
|
have ten digits.
|
|
|
|
|
|
|
|
.. class:: au.forms.AUStateSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Australian states/territories as its
|
|
|
|
choices.
|
|
|
|
|
2011-04-22 12:01:59 +00:00
|
|
|
.. class:: au.models.AUPhoneNumberField
|
|
|
|
|
|
|
|
A model field that checks that the value is a valid Australian phone
|
|
|
|
number (ten digits).
|
|
|
|
|
|
|
|
.. class:: au.models.AUStateField
|
|
|
|
|
|
|
|
A model field that forms represent as a ``forms.AUStateField`` field and
|
|
|
|
stores the three-letter Australian state abbreviation in the database.
|
|
|
|
|
|
|
|
.. class:: au.models.AUPostCodeField
|
|
|
|
|
|
|
|
A model field that forms represent as a ``forms.AUPostCodeField`` field
|
|
|
|
and stores the four-digit Australian postcode in the database.
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Austria (``at``)
|
|
|
|
================
|
|
|
|
|
|
|
|
.. class:: at.forms.ATZipCodeField
|
|
|
|
|
2011-06-25 12:39:29 +00:00
|
|
|
A form field that validates its input as an Austrian zip code, with the
|
|
|
|
format XXXX (first digit must be greater than 0).
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
.. class:: at.forms.ATStateSelect
|
|
|
|
|
2009-12-26 06:37:26 +00:00
|
|
|
A ``Select`` widget that uses a list of Austrian states as its choices.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
.. class:: at.forms.ATSocialSecurityNumberField
|
|
|
|
|
|
|
|
A form field that validates its input as an Austrian social security number.
|
|
|
|
|
2010-10-11 23:35:23 +00:00
|
|
|
Belgium (``be``)
|
|
|
|
================
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
|
|
.. class:: be.forms.BEPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Belgium phone number, with one of
|
|
|
|
the formats 0x xxx xx xx, 0xx xx xx xx, 04xx xx xx xx, 0x/xxx.xx.xx,
|
|
|
|
0xx/xx.xx.xx, 04xx/xx.xx.xx, 0x.xxx.xx.xx, 0xx.xx.xx.xx, 04xx.xx.xx.xx,
|
|
|
|
0xxxxxxxx or 04xxxxxxxx.
|
|
|
|
|
|
|
|
.. class:: be.forms.BEPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Belgium postal code, in the range
|
|
|
|
and format 1XXX-9XXX.
|
|
|
|
|
|
|
|
.. class:: be.forms.BEProvinceSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Belgium provinces as its
|
|
|
|
choices.
|
|
|
|
|
|
|
|
.. class:: be.forms.BERegionSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Belgium regions as its
|
|
|
|
choices.
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Brazil (``br``)
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. class:: br.forms.BRPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Brazilian phone number, with the format
|
|
|
|
XX-XXXX-XXXX.
|
|
|
|
|
|
|
|
.. class:: br.forms.BRZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Brazilian zip code, with the format
|
|
|
|
XXXXX-XXX.
|
|
|
|
|
|
|
|
.. class:: br.forms.BRStateSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Brazilian states/territories as its
|
|
|
|
choices.
|
|
|
|
|
2010-10-15 09:30:42 +00:00
|
|
|
.. class:: br.forms.BRCPFField
|
|
|
|
|
|
|
|
A form field that validates input as `Brazilian CPF`_.
|
2010-11-01 00:52:58 +00:00
|
|
|
|
2010-10-15 09:30:42 +00:00
|
|
|
Input can either be of the format XXX.XXX.XXX-VD or be a group of 11 digits.
|
|
|
|
|
|
|
|
.. _Brazilian CPF: http://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F%C3%ADsicas
|
|
|
|
|
|
|
|
.. class:: br.forms.BRCNPJField
|
|
|
|
|
|
|
|
A form field that validates input as `Brazilian CNPJ`_.
|
2010-11-01 00:52:58 +00:00
|
|
|
|
2010-10-15 09:30:42 +00:00
|
|
|
Input can either be of the format XX.XXX.XXX/XXXX-XX or be a group of 14
|
|
|
|
digits.
|
|
|
|
|
|
|
|
.. _Brazilian CNPJ: http://en.wikipedia.org/wiki/National_identification_number#Brazil
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Canada (``ca``)
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. class:: ca.forms.CAPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Canadian phone number, with the format
|
|
|
|
XXX-XXX-XXXX.
|
|
|
|
|
|
|
|
.. class:: ca.forms.CAPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Canadian postal code, with the format
|
|
|
|
XXX XXX.
|
|
|
|
|
|
|
|
.. class:: ca.forms.CAProvinceField
|
|
|
|
|
|
|
|
A form field that validates input as a Canadian province name or abbreviation.
|
|
|
|
|
|
|
|
.. class:: ca.forms.CASocialInsuranceNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Canadian Social Insurance Number (SIN).
|
|
|
|
A valid number must have the format XXX-XXX-XXX and pass a `Luhn mod-10
|
|
|
|
checksum`_.
|
|
|
|
|
|
|
|
.. _Luhn mod-10 checksum: http://en.wikipedia.org/wiki/Luhn_algorithm
|
|
|
|
|
|
|
|
.. class:: ca.forms.CAProvinceSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Canadian provinces and territories as
|
|
|
|
its choices.
|
|
|
|
|
|
|
|
Chile (``cl``)
|
|
|
|
==============
|
|
|
|
|
|
|
|
.. class:: cl.forms.CLRutField
|
|
|
|
|
|
|
|
A form field that validates input as a Chilean national identification number
|
|
|
|
('Rol Unico Tributario' or RUT). The valid format is XX.XXX.XXX-X.
|
|
|
|
|
|
|
|
.. class:: cl.forms.CLRegionSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Chilean regions (Regiones) as its
|
|
|
|
choices.
|
|
|
|
|
2011-04-22 12:02:38 +00:00
|
|
|
China (``cn``)
|
|
|
|
==============
|
|
|
|
|
2011-04-22 12:03:30 +00:00
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
2011-04-22 12:02:38 +00:00
|
|
|
.. class:: cn.forms.CNProvinceSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Chinese regions as its choices.
|
|
|
|
|
|
|
|
.. class:: cn.forms.CNPostCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Chinese post code.
|
|
|
|
Valid formats are XXXXXX where X is digit.
|
|
|
|
|
|
|
|
.. class:: cn.forms.CNIDCardField
|
|
|
|
|
|
|
|
A form field that validates input as a Chinese Identification Card Number.
|
|
|
|
Both 1st and 2nd generation ID Card Number are validated.
|
|
|
|
|
|
|
|
.. class:: cn.forms.CNPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Chinese phone number.
|
|
|
|
Valid formats are 0XX-XXXXXXXX, composed of 3 or 4 digits of region code
|
|
|
|
and 7 or 8 digits of phone number.
|
|
|
|
|
|
|
|
.. class:: cn.forms.CNCellNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Chinese mobile phone number.
|
|
|
|
Valid formats are like 1XXXXXXXXXX, where X is digit.
|
|
|
|
The second digit could only be 3, 5 and 8.
|
|
|
|
|
2011-07-29 09:41:14 +00:00
|
|
|
Colombia (``co``)
|
|
|
|
=================
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
.. class:: co.forms.CoDepartmentSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Colombian departments
|
|
|
|
as its choices.
|
|
|
|
|
2011-04-22 12:03:42 +00:00
|
|
|
Croatia (``hr``)
|
2011-04-28 00:28:42 +00:00
|
|
|
================
|
2011-04-22 12:03:42 +00:00
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
.. class:: hr.forms.HRCountySelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of counties of Croatia as its choices.
|
|
|
|
|
|
|
|
.. class:: hr.forms.HRPhoneNumberPrefixSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of phone number prefixes of Croatia as
|
|
|
|
its choices.
|
|
|
|
|
|
|
|
.. class:: hr.forms.HRLicensePlatePrefixSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of vehicle license plate prefixes of
|
|
|
|
Croatia as its choices.
|
|
|
|
|
|
|
|
.. class:: hr.forms.HRPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a phone number of Croatia.
|
|
|
|
A valid format is a country code or a leading zero, area code prefix, 6 or 7
|
|
|
|
digit number; e.g. +385XXXXXXXX or 0XXXXXXXX
|
|
|
|
Validates fixed, mobile and FGSM numbers. Normalizes to a full number with
|
|
|
|
country code (+385 prefix).
|
|
|
|
|
|
|
|
.. class:: hr.forms.HRLicensePlateField
|
|
|
|
|
|
|
|
A form field that validates input as a vehicle license plate of Croatia.
|
|
|
|
Normalizes to the specific format XX YYYY-XX where X is a letter and Y a
|
|
|
|
digit. There can be three or four digits.
|
|
|
|
Suffix is constructed from the shared letters of the Croatian and English
|
|
|
|
alphabets.
|
|
|
|
It is used for standardized license plates only. Special cases like license
|
|
|
|
plates for oldtimers, temporary license plates, government institution
|
|
|
|
license plates and customized license plates are not covered by this field.
|
|
|
|
|
|
|
|
.. class:: hr.forms.HRPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a postal code of Croatia.
|
|
|
|
It consists of exactly five digits ranging from 10000 to 59999 inclusive.
|
|
|
|
|
|
|
|
.. class:: hr.forms.HROIBField
|
|
|
|
|
|
|
|
A form field that validates input as a Personal Identification Number (OIB)
|
|
|
|
of Croatia.
|
|
|
|
It consists of exactly eleven digits.
|
|
|
|
|
|
|
|
.. class:: hr.forms.HRJMBGField
|
|
|
|
|
|
|
|
A form field that validates input as a Unique Master Citizen Number (JMBG).
|
|
|
|
The number is still in use in Croatia, but it is being replaced by OIB.
|
|
|
|
This field works for other ex-Yugoslavia countries as well where the JMBG is
|
|
|
|
still in use.
|
|
|
|
The area segment of the JMBG is not validated because the citizens might
|
|
|
|
have emigrated to another ex-Yugoslavia country.
|
|
|
|
The number consists of exactly thirteen digits.
|
|
|
|
|
|
|
|
.. class:: hr.forms.HRJMBAGField
|
|
|
|
|
|
|
|
A form field that validates input as a Unique Master Academic Citizen Number
|
|
|
|
(JMBAG) of Croatia.
|
|
|
|
This number is used by college students and professors in Croatia.
|
|
|
|
The number consists of exactly nineteen digits.
|
|
|
|
|
2009-02-22 07:51:57 +00:00
|
|
|
Czech (``cz``)
|
|
|
|
==============
|
|
|
|
|
|
|
|
.. class:: cz.forms.CZPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Czech postal code. Valid formats
|
|
|
|
are XXXXX or XXX XX, where X is a digit.
|
|
|
|
|
|
|
|
.. class:: cz.forms.CZBirthNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Czech Birth Number.
|
|
|
|
A valid number must be in format XXXXXX/XXXX (slash is optional).
|
|
|
|
|
|
|
|
.. class:: cz.forms.CZICNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Czech IC number field.
|
|
|
|
|
|
|
|
.. class:: cz.forms.CZRegionSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Czech regions as its choices.
|
|
|
|
|
2011-07-29 09:41:14 +00:00
|
|
|
Ecuador (``ec``)
|
|
|
|
================
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
.. class:: ec.forms.EcProvinceSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Ecuatorian provinces as
|
|
|
|
its choices.
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Finland (``fi``)
|
|
|
|
================
|
|
|
|
|
|
|
|
.. class:: fi.forms.FISocialSecurityNumber
|
|
|
|
|
|
|
|
A form field that validates input as a Finnish social security number.
|
|
|
|
|
|
|
|
.. class:: fi.forms.FIZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Finnish zip code. Valid codes
|
|
|
|
consist of five digits.
|
|
|
|
|
|
|
|
.. class:: fi.forms.FIMunicipalitySelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Finnish municipalities as its
|
|
|
|
choices.
|
|
|
|
|
|
|
|
France (``fr``)
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. class:: fr.forms.FRPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a French local phone number. The
|
|
|
|
correct format is 0X XX XX XX XX. 0X.XX.XX.XX.XX and 0XXXXXXXXX validate
|
|
|
|
but are corrected to 0X XX XX XX XX.
|
|
|
|
|
|
|
|
.. class:: fr.forms.FRZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a French zip code. Valid codes
|
|
|
|
consist of five digits.
|
|
|
|
|
|
|
|
.. class:: fr.forms.FRDepartmentSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of French departments as its choices.
|
|
|
|
|
|
|
|
Germany (``de``)
|
|
|
|
================
|
|
|
|
|
|
|
|
.. class:: de.forms.DEIdentityCardNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a German identity card number
|
|
|
|
(Personalausweis_). Valid numbers have the format
|
|
|
|
XXXXXXXXXXX-XXXXXXX-XXXXXXX-X, with no group consisting entirely of zeroes.
|
|
|
|
|
|
|
|
.. _Personalausweis: http://de.wikipedia.org/wiki/Personalausweis
|
|
|
|
|
|
|
|
.. class:: de.forms.DEZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a German zip code. Valid codes
|
|
|
|
consist of five digits.
|
|
|
|
|
|
|
|
.. class:: de.forms.DEStateSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of German states as its choices.
|
|
|
|
|
2012-04-09 17:25:02 +00:00
|
|
|
Hong Kong (``hk``)
|
|
|
|
==================
|
|
|
|
|
|
|
|
.. class:: hk.forms.HKPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Hong Kong phone number.
|
|
|
|
|
|
|
|
|
2008-12-07 03:42:25 +00:00
|
|
|
The Netherlands (``nl``)
|
|
|
|
========================
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
.. class:: nl.forms.NLPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Dutch telephone number.
|
|
|
|
|
|
|
|
.. class:: nl.forms.NLSofiNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Dutch social security number
|
|
|
|
(SoFI/BSN).
|
|
|
|
|
|
|
|
.. class:: nl.forms.NLZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Dutch zip code.
|
|
|
|
|
|
|
|
.. class:: nl.forms.NLProvinceSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Dutch provinces as its list of
|
|
|
|
choices.
|
|
|
|
|
|
|
|
Iceland (``is_``)
|
|
|
|
=================
|
|
|
|
|
|
|
|
.. class:: is_.forms.ISIdNumberField
|
|
|
|
|
|
|
|
A form field that validates input as an Icelandic identification number
|
|
|
|
(kennitala). The format is XXXXXX-XXXX.
|
|
|
|
|
|
|
|
.. class:: is_.forms.ISPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as an Icelandtic phone number (seven
|
|
|
|
digits with an optional hyphen or space after the first three digits).
|
|
|
|
|
|
|
|
.. class:: is_.forms.ISPostalCodeSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Icelandic postal codes as its
|
|
|
|
choices.
|
|
|
|
|
|
|
|
India (``in_``)
|
|
|
|
===============
|
|
|
|
|
2011-07-03 17:56:15 +00:00
|
|
|
.. class:: in_.forms.INStateField
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A form field that validates input as an Indian state/territory name or
|
|
|
|
abbreviation. Input is normalized to the standard two-letter vehicle
|
|
|
|
registration abbreviation for the given state or territory.
|
|
|
|
|
2011-07-03 17:56:15 +00:00
|
|
|
.. class:: in_.forms.INZipCodeField
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A form field that validates input as an Indian zip code, with the
|
|
|
|
format XXXXXXX.
|
|
|
|
|
2011-07-03 17:56:15 +00:00
|
|
|
.. class:: in_.forms.INStateSelect
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Indian states/territories as its
|
|
|
|
choices.
|
|
|
|
|
2011-07-03 17:56:15 +00:00
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
.. class:: in_.forms.INPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates that the data is a valid Indian phone number,
|
|
|
|
including the STD code. It's normalised to 0XXX-XXXXXXX or 0XXX XXXXXXX
|
|
|
|
format. The first string is the STD code which is a '0' followed by 2-4
|
|
|
|
digits. The second string is 8 digits if the STD code is 3 digits, 7
|
|
|
|
digits if the STD code is 4 digits and 6 digits if the STD code is 5
|
|
|
|
digits. The second string will start with numbers between 1 and 6. The
|
|
|
|
separator is either a space or a hyphen.
|
|
|
|
|
2010-01-01 21:33:00 +00:00
|
|
|
Ireland (``ie``)
|
|
|
|
================
|
|
|
|
|
|
|
|
.. class:: ie.forms.IECountySelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Irish Counties as its choices.
|
|
|
|
|
2010-01-01 21:34:50 +00:00
|
|
|
Indonesia (``id``)
|
|
|
|
==================
|
|
|
|
|
|
|
|
.. class:: id.forms.IDPostCodeField
|
|
|
|
|
|
|
|
A form field that validates input as an Indonesian post code field.
|
|
|
|
|
|
|
|
.. class:: id.forms.IDProvinceSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Indonesian provinces as its choices.
|
|
|
|
|
2010-11-01 00:52:58 +00:00
|
|
|
.. versionchanged:: 1.3
|
|
|
|
The province "Nanggroe Aceh Darussalam (NAD)" has been removed
|
|
|
|
from the province list in favor of the new official designation
|
|
|
|
"Aceh (ACE)".
|
|
|
|
|
2010-01-01 21:34:50 +00:00
|
|
|
.. class:: id.forms.IDPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as an Indonesian telephone number.
|
|
|
|
|
|
|
|
.. class:: id.forms.IDLicensePlatePrefixSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Indonesian license plate
|
|
|
|
prefix code as its choices.
|
|
|
|
|
|
|
|
.. class:: id.forms.IDLicensePlateField
|
|
|
|
|
|
|
|
A form field that validates input as an Indonesian vehicle license plate.
|
|
|
|
|
|
|
|
.. class:: id.forms.IDNationalIdentityNumberField
|
|
|
|
|
|
|
|
A form field that validates input as an Indonesian national identity
|
|
|
|
number (`NIK`_/KTP). The output will be in the format of
|
|
|
|
'XX.XXXX.DDMMYY.XXXX'. Dots or spaces can be used in the input to break
|
|
|
|
down the numbers.
|
|
|
|
|
|
|
|
.. _NIK: http://en.wikipedia.org/wiki/Indonesian_identity_card
|
|
|
|
|
2010-10-15 02:58:10 +00:00
|
|
|
Israel (``il``)
|
|
|
|
===============
|
|
|
|
|
2010-10-15 03:15:15 +00:00
|
|
|
.. class:: il.forms.ILPostalCodeField
|
2010-10-15 02:58:10 +00:00
|
|
|
|
|
|
|
A form field that validates its input as an Israeli five-digit postal code.
|
|
|
|
|
|
|
|
.. class:: il.forms.ILIDNumberField
|
|
|
|
|
|
|
|
A form field that validates its input as an `Israeli identification number`_.
|
|
|
|
The output will be in the format of a 2-9 digit number, consisting of a
|
2010-10-15 03:15:15 +00:00
|
|
|
1-8 digit ID number followed by a single checksum digit, calculated using
|
|
|
|
the `Luhn algorithm`_.
|
2010-10-15 02:58:10 +00:00
|
|
|
|
|
|
|
Input may contain an optional hyphen separating the ID number from the checksum
|
|
|
|
digit.
|
|
|
|
|
|
|
|
.. _Israeli identification number: http://he.wikipedia.org/wiki/%D7%9E%D7%A1%D7%A4%D7%A8_%D7%96%D7%94%D7%95%D7%AA_(%D7%99%D7%A9%D7%A8%D7%90%D7%9C)
|
|
|
|
.. _Luhn algorithm: http://en.wikipedia.org/wiki/Luhn_algorithm
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Italy (``it``)
|
|
|
|
==============
|
|
|
|
|
|
|
|
.. class:: it.forms.ITSocialSecurityNumberField
|
|
|
|
|
|
|
|
A form field that validates input as an Italian social security number
|
|
|
|
(`codice fiscale`_).
|
|
|
|
|
2012-06-28 08:49:07 +00:00
|
|
|
.. _codice fiscale: http://www.agenziaentrate.gov.it/wps/content/Nsilib/Nsi/Home/CosaDeviFare/Richiedere/Codice+fiscale+e+tessera+sanitaria/Richiesta+TS_CF/SchedaI/Informazioni+codificazione+pf/
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
.. class:: it.forms.ITVatNumberField
|
|
|
|
|
|
|
|
A form field that validates Italian VAT numbers (partita IVA).
|
|
|
|
|
|
|
|
.. class:: it.forms.ITZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as an Italian zip code. Valid codes
|
|
|
|
must have five digits.
|
|
|
|
|
|
|
|
.. class:: it.forms.ITProvinceSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Italian provinces as its choices.
|
|
|
|
|
|
|
|
.. class:: it.forms.ITRegionSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Italian regions as its choices.
|
|
|
|
|
|
|
|
Japan (``jp``)
|
|
|
|
==============
|
|
|
|
|
|
|
|
.. class:: jp.forms.JPPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Japanese postcode. It accepts seven
|
|
|
|
digits, with or without a hyphen.
|
|
|
|
|
|
|
|
.. class:: jp.forms.JPPrefectureSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Japanese prefectures as its choices.
|
|
|
|
|
2010-01-01 21:32:24 +00:00
|
|
|
Kuwait (``kw``)
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. class:: kw.forms.KWCivilIDNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Kuwaiti Civil ID number. A valid
|
|
|
|
Civil ID number must obey the following rules:
|
|
|
|
|
|
|
|
* The number consist of 12 digits.
|
|
|
|
* The birthdate of the person is a valid date.
|
|
|
|
* The calculated checksum equals to the last digit of the Civil ID.
|
|
|
|
|
2011-06-12 13:31:40 +00:00
|
|
|
Macedonia (``mk``)
|
|
|
|
===================
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
.. class:: mk.forms.MKIdentityCardNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Macedonian identity card number.
|
|
|
|
Both old and new identity card numbers are supported.
|
|
|
|
|
|
|
|
|
|
|
|
.. class:: mk.forms.MKMunicipalitySelect
|
|
|
|
|
|
|
|
A form ``Select`` widget that uses a list of Macedonian municipalities as
|
|
|
|
choices.
|
|
|
|
|
|
|
|
|
|
|
|
.. class:: mk.forms.UMCNField
|
|
|
|
|
|
|
|
A form field that validates input as a unique master citizen
|
|
|
|
number.
|
|
|
|
|
|
|
|
The format of the unique master citizen number is not unique
|
|
|
|
to Macedonia. For more information see:
|
|
|
|
https://secure.wikimedia.org/wikipedia/en/wiki/Unique_Master_Citizen_Number
|
|
|
|
|
|
|
|
A value will pass validation if it complies to the following rules:
|
|
|
|
|
|
|
|
* Consists of exactly 13 digits
|
|
|
|
* The first 7 digits represent a valid past date in the format DDMMYYY
|
|
|
|
* The last digit of the UMCN passes a checksum test
|
|
|
|
|
|
|
|
|
|
|
|
.. class:: mk.models.MKIdentityCardNumberField
|
|
|
|
|
|
|
|
A model field that forms represent as a
|
|
|
|
``forms.MKIdentityCardNumberField`` field.
|
|
|
|
|
|
|
|
|
|
|
|
.. class:: mk.models.MKMunicipalityField
|
|
|
|
|
|
|
|
A model field that forms represent as a
|
|
|
|
``forms.MKMunicipalitySelect`` and stores the 2 character code of the
|
|
|
|
municipality in the database.
|
|
|
|
|
|
|
|
|
|
|
|
.. class:: mk.models.UMCNField
|
|
|
|
|
|
|
|
A model field that forms represent as a ``forms.UMCNField`` field.
|
|
|
|
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Mexico (``mx``)
|
|
|
|
===============
|
|
|
|
|
2011-07-29 10:20:16 +00:00
|
|
|
.. class:: mx.forms.MXZipCodeField
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
A form field that accepts a Mexican Zip Code.
|
|
|
|
|
|
|
|
More info about this: List of postal codes in Mexico (zipcodes_)
|
|
|
|
|
|
|
|
.. _zipcodes: http://en.wikipedia.org/wiki/List_of_postal_codes_in_Mexico
|
|
|
|
|
|
|
|
.. class:: mx.forms.MXRFCField
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
A form field that validates a Mexican *Registro Federal de Contribuyentes* for
|
|
|
|
either **Persona física** or **Persona moral**. This field accepts RFC strings
|
|
|
|
whether or not it contains a *homoclave*.
|
|
|
|
|
|
|
|
More info about this: Registro Federal de Contribuyentes (rfc_)
|
|
|
|
|
|
|
|
.. _rfc: http://es.wikipedia.org/wiki/Registro_Federal_de_Contribuyentes_(M%C3%A9xico)
|
|
|
|
|
|
|
|
.. class:: mx.forms.MXCURPField
|
|
|
|
|
2011-10-10 15:32:01 +00:00
|
|
|
.. versionadded:: 1.4
|
2011-07-29 10:20:16 +00:00
|
|
|
|
|
|
|
A field that validates a Mexican *Clave Única de Registro de Población*.
|
|
|
|
|
|
|
|
More info about this: Clave Unica de Registro de Poblacion (curp_)
|
|
|
|
|
|
|
|
.. _curp: http://www.condusef.gob.mx/index.php/clave-unica-de-registro-de-poblacion-curp
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
.. class:: mx.forms.MXStateSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Mexican states as its choices.
|
|
|
|
|
2011-07-29 10:20:16 +00:00
|
|
|
.. class:: mx.models.MXStateField
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
A model field that stores the three-letter Mexican state abbreviation in the
|
|
|
|
database.
|
|
|
|
|
|
|
|
.. class:: mx.models.MXZipCodeField
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
A model field that forms represent as a ``forms.MXZipCodeField`` field and
|
|
|
|
stores the five-digit Mexican zip code.
|
|
|
|
|
|
|
|
.. class:: mx.models.MXRFCField
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
A model field that forms represent as a ``forms.MXRFCField`` field and
|
|
|
|
stores the value of a valid Mexican RFC.
|
|
|
|
|
|
|
|
.. class:: mx.models.MXCURPField
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
A model field that forms represent as a ``forms.MXCURPField`` field and
|
|
|
|
stores the value of a valid Mexican CURP.
|
|
|
|
|
|
|
|
Additionally, a choice tuple is provided in ``django.contrib.localflavor.mx.mx_states``,
|
|
|
|
allowing customized model and form fields, and form presentations, for subsets of
|
|
|
|
Mexican states abbreviations:
|
|
|
|
|
|
|
|
.. data:: mx.mx_states.STATE_CHOICES
|
|
|
|
|
|
|
|
A tuple of choices of the states abbreviations for all 31 Mexican states,
|
|
|
|
plus the `Distrito Federal`.
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Norway (``no``)
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. class:: no.forms.NOSocialSecurityNumber
|
|
|
|
|
|
|
|
A form field that validates input as a Norwegian social security number
|
|
|
|
(personnummer_).
|
|
|
|
|
|
|
|
.. _personnummer: http://no.wikipedia.org/wiki/Personnummer
|
|
|
|
|
|
|
|
.. class:: no.forms.NOZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Norwegian zip code. Valid codes
|
|
|
|
have four digits.
|
|
|
|
|
|
|
|
.. class:: no.forms.NOMunicipalitySelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Norwegian municipalities (fylker) as
|
|
|
|
its choices.
|
|
|
|
|
2011-06-28 10:17:23 +00:00
|
|
|
Paraguay (``py``)
|
|
|
|
=================
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
.. class:: py.forms.PyDepartmentSelect
|
|
|
|
|
|
|
|
A ``Select`` widget with a list of Paraguayan departments as choices.
|
|
|
|
|
|
|
|
.. class:: py.forms.PyNumberedDepartmentSelect
|
|
|
|
|
|
|
|
A ``Select`` widget with a roman numbered list of Paraguayan departments as choices.
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Peru (``pe``)
|
|
|
|
=============
|
|
|
|
|
2010-01-01 21:35:26 +00:00
|
|
|
.. class:: pe.forms.PEDNIField
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A form field that validates input as a DNI (Peruvian national identity)
|
|
|
|
number.
|
|
|
|
|
2010-01-01 21:35:26 +00:00
|
|
|
.. class:: pe.forms.PERUCField
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A form field that validates input as an RUC (Registro Unico de
|
|
|
|
Contribuyentes) number. Valid RUC numbers have 11 digits.
|
|
|
|
|
2010-01-01 21:35:26 +00:00
|
|
|
.. class:: pe.forms.PEDepartmentSelect
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Peruvian Departments as its choices.
|
|
|
|
|
|
|
|
Poland (``pl``)
|
|
|
|
===============
|
|
|
|
|
2010-01-01 21:34:12 +00:00
|
|
|
.. class:: pl.forms.PLPESELField
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A form field that validates input as a Polish national identification number
|
|
|
|
(PESEL_).
|
|
|
|
|
|
|
|
.. _PESEL: http://en.wikipedia.org/wiki/PESEL
|
|
|
|
|
2011-04-28 13:20:33 +00:00
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
.. class:: pl.forms.PLNationalIDCardNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Polish National ID Card number. The
|
|
|
|
valid format is AAAXXXXXX, where A is letter (A-Z), X is digit and left-most
|
|
|
|
digit is checksum digit. More information about checksum calculation algorithm
|
|
|
|
see `Polish identity card`_.
|
|
|
|
|
|
|
|
.. _`Polish identity card`: http://en.wikipedia.org/wiki/Polish_identity_card
|
|
|
|
|
2010-01-01 21:34:12 +00:00
|
|
|
.. class:: pl.forms.PLREGONField
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A form field that validates input as a Polish National Official Business
|
|
|
|
Register Number (REGON_), having either seven or nine digits. The checksum
|
|
|
|
algorithm used for REGONs is documented at
|
|
|
|
http://wipos.p.lodz.pl/zylla/ut/nip-rego.html.
|
|
|
|
|
|
|
|
.. _REGON: http://www.stat.gov.pl/bip/regon_ENG_HTML.htm
|
|
|
|
|
|
|
|
.. class:: pl.forms.PLPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Polish postal code. The valid format
|
|
|
|
is XX-XXX, where X is a digit.
|
|
|
|
|
2010-01-01 21:34:12 +00:00
|
|
|
.. class:: pl.forms.PLNIPField
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2012-01-07 11:17:44 +00:00
|
|
|
A form field that validates input as a Polish Tax Number (NIP). Valid formats
|
|
|
|
are XXX-XXX-XX-XX, XXX-XX-XX-XXX or XXXXXXXXXX. The checksum algorithm used
|
2008-08-23 22:25:40 +00:00
|
|
|
for NIPs is documented at http://wipos.p.lodz.pl/zylla/ut/nip-rego.html.
|
|
|
|
|
2010-01-01 21:34:12 +00:00
|
|
|
.. class:: pl.forms.PLCountySelect
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Polish administrative units as its
|
|
|
|
choices.
|
|
|
|
|
2010-01-01 21:34:12 +00:00
|
|
|
.. class:: pl.forms.PLProvinceSelect
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Polish voivodeships (administrative
|
|
|
|
provinces) as its choices.
|
|
|
|
|
2010-01-01 21:35:26 +00:00
|
|
|
Portugal (``pt``)
|
|
|
|
=================
|
|
|
|
|
|
|
|
.. class:: pt.forms.PTZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Portuguese zip code.
|
|
|
|
|
|
|
|
.. class:: pt.forms.PTPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Portuguese phone number.
|
|
|
|
Valid numbers have 9 digits (may include spaces) or start by 00
|
|
|
|
or + (international).
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Romania (``ro``)
|
|
|
|
================
|
|
|
|
|
|
|
|
.. class:: ro.forms.ROCIFField
|
|
|
|
|
|
|
|
A form field that validates Romanian fiscal identification codes (CIF). The
|
|
|
|
return value strips the leading RO, if given.
|
|
|
|
|
|
|
|
.. class:: ro.forms.ROCNPField
|
|
|
|
|
|
|
|
A form field that validates Romanian personal numeric codes (CNP).
|
|
|
|
|
|
|
|
.. class:: ro.forms.ROCountyField
|
|
|
|
|
|
|
|
A form field that validates its input as a Romanian county (judet) name or
|
|
|
|
abbreviation. It normalizes the input to the standard vehicle registration
|
|
|
|
abbreviation for the given county. This field will only accept names written
|
|
|
|
with diacritics; consider using ROCountySelect as an alternative.
|
|
|
|
|
|
|
|
.. class:: ro.forms.ROCountySelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Romanian counties (judete) as its
|
|
|
|
choices.
|
|
|
|
|
|
|
|
.. class:: ro.forms.ROIBANField
|
|
|
|
|
2009-12-26 06:37:26 +00:00
|
|
|
A form field that validates its input as a Romanian International Bank
|
2008-08-23 22:25:40 +00:00
|
|
|
Account Number (IBAN). The valid format is ROXX-XXXX-XXXX-XXXX-XXXX-XXXX,
|
|
|
|
with or without hyphens.
|
|
|
|
|
|
|
|
.. class:: ro.forms.ROPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates Romanian phone numbers, short special numbers
|
|
|
|
excluded.
|
|
|
|
|
|
|
|
.. class:: ro.forms.ROPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates Romanian postal codes.
|
|
|
|
|
2011-04-22 12:03:30 +00:00
|
|
|
Russia (``ru``)
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
.. class:: ru.forms.RUPostalCodeField
|
|
|
|
|
|
|
|
Russian Postal code field. The valid format is XXXXXX, where X is any
|
|
|
|
digit and the first digit is not zero.
|
|
|
|
|
|
|
|
.. class:: ru.forms.RUCountySelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Russian Counties as its choices.
|
|
|
|
|
|
|
|
.. class:: ru.forms.RURegionSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Russian Regions as its choices.
|
|
|
|
|
|
|
|
.. class:: ru.forms.RUPassportNumberField
|
|
|
|
|
|
|
|
Russian internal passport number. The valid format is XXXX XXXXXX, where X
|
|
|
|
is any digit.
|
|
|
|
|
|
|
|
.. class:: ru.forms.RUAlienPassportNumberField
|
|
|
|
|
|
|
|
Russian alien's passport number. The valid format is XX XXXXXXX, where X
|
|
|
|
is any digit.
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Slovakia (``sk``)
|
|
|
|
=================
|
|
|
|
|
|
|
|
.. class:: sk.forms.SKPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Slovak postal code. Valid formats
|
|
|
|
are XXXXX or XXX XX, where X is a digit.
|
|
|
|
|
|
|
|
.. class:: sk.forms.SKDistrictSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Slovak districts as its choices.
|
|
|
|
|
|
|
|
.. class:: sk.forms.SKRegionSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Slovak regions as its choices.
|
|
|
|
|
2011-08-28 13:51:28 +00:00
|
|
|
Slovenia (``si``)
|
|
|
|
=================
|
|
|
|
|
|
|
|
.. class:: si.forms.SIEMSOField
|
|
|
|
|
|
|
|
A form field that validates input as Slovenian personal identification
|
|
|
|
number and stores gender and birthday to self.info dictionary.
|
|
|
|
|
|
|
|
.. class:: si.forms.SITaxNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Slovenian tax number. Valid input
|
|
|
|
is SIXXXXXXXX or XXXXXXXX.
|
|
|
|
|
|
|
|
.. class:: si.forms.SIPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Slovenian phone number. Phone
|
|
|
|
number must contain at least local area code with optional country code.
|
|
|
|
|
|
|
|
.. class:: si.forms.SIPostalCodeField
|
|
|
|
|
|
|
|
A form field that provides a choice field of major Slovenian postal
|
|
|
|
codes.
|
|
|
|
|
|
|
|
.. class:: si.forms.SIPostalCodeSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of major Slovenian postal codes as
|
|
|
|
its choices.
|
|
|
|
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
South Africa (``za``)
|
|
|
|
=====================
|
|
|
|
|
|
|
|
.. class:: za.forms.ZAIDField
|
|
|
|
|
|
|
|
A form field that validates input as a South African ID number. Validation
|
|
|
|
uses the Luhn checksum and a simplistic (i.e., not entirely accurate) check
|
|
|
|
for birth date.
|
|
|
|
|
|
|
|
.. class:: za.forms.ZAPostCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a South African postcode. Valid
|
|
|
|
postcodes must have four digits.
|
|
|
|
|
|
|
|
Spain (``es``)
|
|
|
|
==============
|
|
|
|
|
|
|
|
.. class:: es.forms.ESIdentityCardNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Spanish NIF/NIE/CIF (Fiscal
|
|
|
|
Identification Number) code.
|
|
|
|
|
|
|
|
.. class:: es.forms.ESCCCField
|
|
|
|
|
|
|
|
A form field that validates input as a Spanish bank account number (Codigo
|
|
|
|
Cuenta Cliente or CCC). A valid CCC number has the format
|
|
|
|
EEEE-OOOO-CC-AAAAAAAAAA, where the E, O, C and A digits denote the entity,
|
|
|
|
office, checksum and account, respectively. The first checksum digit
|
|
|
|
validates the entity and office. The second checksum digit validates the
|
|
|
|
account. It is also valid to use a space as a delimiter, or to use no
|
|
|
|
delimiter.
|
|
|
|
|
|
|
|
.. class:: es.forms.ESPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Spanish phone number. Valid numbers
|
|
|
|
have nine digits, the first of which is 6, 8 or 9.
|
|
|
|
|
|
|
|
.. class:: es.forms.ESPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Spanish postal code. Valid codes
|
|
|
|
have five digits, the first two being in the range 01 to 52, representing
|
|
|
|
the province.
|
|
|
|
|
|
|
|
.. class:: es.forms.ESProvinceSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Spanish provinces as its choices.
|
|
|
|
|
|
|
|
.. class:: es.forms.ESRegionSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Spanish regions as its choices.
|
|
|
|
|
2009-12-22 21:10:40 +00:00
|
|
|
Sweden (``se``)
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. class:: se.forms.SECountySelect
|
|
|
|
|
|
|
|
A Select form widget that uses a list of the Swedish counties (län) as its
|
|
|
|
choices.
|
|
|
|
|
|
|
|
The cleaned value is the official county code -- see
|
|
|
|
http://en.wikipedia.org/wiki/Counties_of_Sweden for a list.
|
|
|
|
|
|
|
|
.. class:: se.forms.SEOrganisationNumber
|
|
|
|
|
|
|
|
A form field that validates input as a Swedish organisation number
|
|
|
|
(organisationsnummer).
|
|
|
|
|
|
|
|
It accepts the same input as SEPersonalIdentityField (for sole
|
|
|
|
proprietorships (enskild firma). However, co-ordination numbers are not
|
|
|
|
accepted.
|
|
|
|
|
|
|
|
It also accepts ordinary Swedish organisation numbers with the format
|
|
|
|
NNNNNNNNNN.
|
|
|
|
|
|
|
|
The return value will be YYYYMMDDXXXX for sole proprietors, and NNNNNNNNNN
|
|
|
|
for other organisations.
|
|
|
|
|
|
|
|
.. class:: se.forms.SEPersonalIdentityNumber
|
|
|
|
|
|
|
|
A form field that validates input as a Swedish personal identity number
|
|
|
|
(personnummer).
|
|
|
|
|
|
|
|
The correct formats are YYYYMMDD-XXXX, YYYYMMDDXXXX, YYMMDD-XXXX,
|
|
|
|
YYMMDDXXXX and YYMMDD+XXXX.
|
|
|
|
|
|
|
|
A \+ indicates that the person is older than 100 years, which will be taken
|
|
|
|
into consideration when the date is validated.
|
2009-12-26 06:37:26 +00:00
|
|
|
|
2009-12-22 21:10:40 +00:00
|
|
|
The checksum will be calculated and checked. The birth date is checked
|
|
|
|
to be a valid date.
|
|
|
|
|
|
|
|
By default, co-ordination numbers (samordningsnummer) will be accepted. To
|
|
|
|
only allow real personal identity numbers, pass the keyword argument
|
|
|
|
coordination_number=False to the constructor.
|
|
|
|
|
|
|
|
The cleaned value will always have the format YYYYMMDDXXXX.
|
|
|
|
|
|
|
|
.. class:: se.forms.SEPostalCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Swedish postal code (postnummer).
|
|
|
|
Valid codes consist of five digits (XXXXX). The number can optionally be
|
|
|
|
formatted with a space after the third digit (XXX XX).
|
|
|
|
|
2009-12-26 06:37:26 +00:00
|
|
|
The cleaned value will never contain the space.
|
2009-12-22 21:10:40 +00:00
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
Switzerland (``ch``)
|
|
|
|
====================
|
|
|
|
|
|
|
|
.. class:: ch.forms.CHIdentityCardNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Swiss identity card number.
|
|
|
|
A valid number must confirm to the X1234567<0 or 1234567890 format and
|
2011-06-18 11:59:32 +00:00
|
|
|
have the correct checksums.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
.. class:: ch.forms.CHPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Swiss phone number. The correct
|
|
|
|
format is 0XX XXX XX XX. 0XX.XXX.XX.XX and 0XXXXXXXXX validate but are
|
|
|
|
corrected to 0XX XXX XX XX.
|
|
|
|
|
|
|
|
.. class:: ch.forms.CHZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Swiss zip code. Valid codes
|
|
|
|
consist of four digits.
|
|
|
|
|
|
|
|
.. class:: ch.forms.CHStateSelect
|
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of Swiss states as its choices.
|
|
|
|
|
2010-12-04 05:25:24 +00:00
|
|
|
Turkey (``tr``)
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. class:: tr.forms.TRZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a Turkish zip code. Valid codes
|
|
|
|
consist of five digits.
|
|
|
|
|
|
|
|
.. class:: tr.forms.TRPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a Turkish phone number. The correct
|
|
|
|
format is 0xxx xxx xxxx. +90xxx xxx xxxx and inputs without spaces also
|
|
|
|
validates. The result is normalized to xxx xxx xxxx format.
|
|
|
|
|
|
|
|
.. class:: tr.forms.TRIdentificationNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a TR identification number. A valid
|
|
|
|
number must satisfy the following:
|
|
|
|
|
|
|
|
* The number consist of 11 digits.
|
|
|
|
* The first digit cannot be 0.
|
|
|
|
* (sum(1st, 3rd, 5th, 7th, 9th)*7 - sum(2nd,4th,6th,8th)) % 10) must be
|
2010-12-06 00:01:52 +00:00
|
|
|
equal to the 10th digit.
|
2010-12-04 05:25:24 +00:00
|
|
|
* (sum(1st to 10th) % 10) must be equal to the 11th digit.
|
|
|
|
|
|
|
|
.. class:: tr.forms.TRProvinceSelect
|
|
|
|
|
|
|
|
A ``select`` widget that uses a list of Turkish provinces as its choices.
|
|
|
|
|
2011-05-03 11:52:20 +00:00
|
|
|
United Kingdom (``gb``)
|
2008-08-23 22:25:40 +00:00
|
|
|
=======================
|
|
|
|
|
2011-05-03 11:52:20 +00:00
|
|
|
.. class:: gb.forms.GBPostcodeField
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A form field that validates input as a UK postcode. The regular
|
|
|
|
expression used is sourced from the schema for British Standard BS7666
|
2009-12-26 06:37:26 +00:00
|
|
|
address types at http://www.cabinetoffice.gov.uk/media/291293/bs7666-v2-0.xml.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2011-05-03 11:52:20 +00:00
|
|
|
.. class:: gb.forms.GBCountySelect
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of UK counties/regions as its choices.
|
|
|
|
|
2011-05-03 11:52:20 +00:00
|
|
|
.. class:: gb.forms.GBNationSelect
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
A ``Select`` widget that uses a list of UK nations as its choices.
|
|
|
|
|
|
|
|
United States of America (``us``)
|
|
|
|
=================================
|
|
|
|
|
|
|
|
.. class:: us.forms.USPhoneNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a U.S. phone number.
|
|
|
|
|
|
|
|
.. class:: us.forms.USSocialSecurityNumberField
|
|
|
|
|
|
|
|
A form field that validates input as a U.S. Social Security Number (SSN).
|
|
|
|
A valid SSN must obey the following rules:
|
|
|
|
|
2011-10-10 17:32:33 +00:00
|
|
|
* Format of XXX-XX-XXXX
|
|
|
|
* No group of digits consisting entirely of zeroes
|
|
|
|
* Leading group of digits cannot be 666
|
|
|
|
* Number not in promotional block 987-65-4320 through 987-65-4329
|
|
|
|
* Number not one known to be invalid due to widespread promotional
|
|
|
|
use or distribution (e.g., the Woolworth's number or the 1962
|
|
|
|
promotional number)
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
.. class:: us.forms.USStateField
|
|
|
|
|
|
|
|
A form field that validates input as a U.S. state name or abbreviation. It
|
|
|
|
normalizes the input to the standard two-letter postal service abbreviation
|
|
|
|
for the given state.
|
|
|
|
|
|
|
|
.. class:: us.forms.USZipCodeField
|
|
|
|
|
|
|
|
A form field that validates input as a U.S. ZIP code. Valid formats are
|
|
|
|
XXXXX or XXXXX-XXXX.
|
|
|
|
|
|
|
|
.. class:: us.forms.USStateSelect
|
|
|
|
|
|
|
|
A form ``Select`` widget that uses a list of U.S. states/territories as its
|
|
|
|
choices.
|
2008-09-01 22:15:35 +00:00
|
|
|
|
2010-12-23 02:56:31 +00:00
|
|
|
.. class:: us.forms.USPSSelect
|
|
|
|
|
|
|
|
A form ``Select`` widget that uses a list of U.S Postal Service
|
|
|
|
state, territory and country abbreviations as its choices.
|
|
|
|
|
2008-09-02 00:26:28 +00:00
|
|
|
.. class:: us.models.PhoneNumberField
|
|
|
|
|
|
|
|
A :class:`CharField` that checks that the value is a valid U.S.A.-style phone
|
|
|
|
number (in the format ``XXX-XXX-XXXX``).
|
|
|
|
|
2008-09-01 22:15:35 +00:00
|
|
|
.. class:: us.models.USStateField
|
|
|
|
|
|
|
|
A model field that forms represent as a ``forms.USStateField`` field and
|
|
|
|
stores the two-letter U.S. state abbreviation in the database.
|
2010-01-01 21:31:47 +00:00
|
|
|
|
2010-12-23 02:56:31 +00:00
|
|
|
.. class:: us.models.USPostalCodeField
|
|
|
|
|
|
|
|
A model field that forms represent as a ``forms.USPSSelect`` field
|
|
|
|
and stores the two-letter U.S Postal Service abbreviation in the
|
|
|
|
database.
|
|
|
|
|
|
|
|
Additionally, a variety of choice tuples are provided in
|
|
|
|
``django.contrib.localflavor.us.us_states``, allowing customized model
|
|
|
|
and form fields, and form presentations, for subsets of U.S states,
|
|
|
|
territories and U.S Postal Service abbreviations:
|
|
|
|
|
|
|
|
.. data:: us.us_states.CONTIGUOUS_STATES
|
|
|
|
|
|
|
|
A tuple of choices of the postal abbreviations for the
|
|
|
|
contiguous or "lower 48" states (i.e., all except Alaska and
|
|
|
|
Hawaii), plus the District of Columbia.
|
|
|
|
|
|
|
|
.. data:: us.us_states.US_STATES
|
|
|
|
|
|
|
|
A tuple of choices of the postal abbreviations for all
|
|
|
|
50 U.S. states, plus the District of Columbia.
|
|
|
|
|
|
|
|
.. data:: us.us_states.US_TERRITORIES
|
|
|
|
|
|
|
|
A tuple of choices of the postal abbreviations for U.S
|
|
|
|
territories: American Samoa, Guam, the Northern Mariana Islands,
|
|
|
|
Puerto Rico and the U.S. Virgin Islands.
|
|
|
|
|
|
|
|
.. data:: us.us_states.ARMED_FORCES_STATES
|
|
|
|
|
|
|
|
A tuple of choices of the postal abbreviations of the three U.S
|
|
|
|
military postal "states": Armed Forces Americas, Armed Forces
|
|
|
|
Europe and Armed Forces Pacific.
|
|
|
|
|
|
|
|
.. data:: us.us_states.COFA_STATES
|
|
|
|
|
|
|
|
A tuple of choices of the postal abbreviations of the three
|
|
|
|
independent nations which, under the Compact of Free Association,
|
|
|
|
are served by the U.S. Postal Service: the Federated States of
|
|
|
|
Micronesia, the Marshall Islands and Palau.
|
|
|
|
|
|
|
|
.. data:: us.us_states.OBSOLETE_STATES
|
|
|
|
|
|
|
|
A tuple of choices of obsolete U.S Postal Service state
|
|
|
|
abbreviations: the former abbreviation for the Northern Mariana
|
|
|
|
Islands, plus the Panama Canal Zone, the Philippines and the
|
|
|
|
former Pacific trust territories.
|
|
|
|
|
|
|
|
.. data:: us.us_states.STATE_CHOICES
|
|
|
|
|
|
|
|
A tuple of choices of all postal abbreviations corresponding to U.S states or
|
|
|
|
territories, and the District of Columbia..
|
|
|
|
|
|
|
|
.. data:: us.us_states.USPS_CHOICES
|
|
|
|
|
|
|
|
A tuple of choices of all postal abbreviations recognized by the
|
|
|
|
U.S Postal Service (including all states and territories, the
|
|
|
|
District of Columbia, armed forces "states" and independent
|
|
|
|
nations serviced by USPS).
|
|
|
|
|
2010-01-01 21:31:47 +00:00
|
|
|
Uruguay (``uy``)
|
|
|
|
================
|
|
|
|
|
|
|
|
.. class:: uy.forms.UYCIField
|
|
|
|
|
|
|
|
A field that validates Uruguayan 'Cedula de identidad' (CI) numbers.
|
|
|
|
|
|
|
|
.. class:: uy.forms.UYDepartamentSelect
|
|
|
|
|
2011-08-13 11:58:19 +00:00
|
|
|
A ``Select`` widget that uses a list of Uruguayan departments as its
|
2010-01-01 21:31:47 +00:00
|
|
|
choices.
|