localflavor.txt 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398
  1. ==========================
  2. The "local flavor" add-ons
  3. ==========================
  4. .. module:: django.contrib.localflavor
  5. :synopsis: A collection of various Django snippets that are useful only for
  6. a particular country or culture.
  7. Following its "batteries included" philosophy, Django comes with assorted
  8. pieces of code that are useful for particular countries or cultures. These are
  9. called the "local flavor" add-ons and live in the
  10. :mod:`django.contrib.localflavor` package.
  11. Inside that package, country- or culture-specific code is organized into
  12. subpackages, named using `ISO 3166 country codes`_.
  13. Most of the ``localflavor`` add-ons are localized form components deriving
  14. from the :doc:`forms </topics/forms/index>` framework -- for example, a
  15. :class:`~django.contrib.localflavor.us.forms.USStateField` that knows how to
  16. validate U.S. state abbreviations, and a
  17. :class:`~django.contrib.localflavor.fi.forms.FISocialSecurityNumber` that
  18. knows how to validate Finnish social security numbers.
  19. To use one of these localized components, just import the relevant subpackage.
  20. For example, here's how you can create a form with a field representing a
  21. French telephone number::
  22. from django import forms
  23. from django.contrib.localflavor.fr.forms import FRPhoneNumberField
  24. class MyForm(forms.Form):
  25. my_french_phone_no = FRPhoneNumberField()
  26. Supported countries
  27. ===================
  28. Countries currently supported by :mod:`~django.contrib.localflavor` are:
  29. * Argentina_
  30. * Australia_
  31. * Austria_
  32. * Belgium_
  33. * Brazil_
  34. * Canada_
  35. * Chile_
  36. * China_
  37. * Colombia_
  38. * Croatia_
  39. * Czech_
  40. * Ecuador_
  41. * Finland_
  42. * France_
  43. * Germany_
  44. * Iceland_
  45. * India_
  46. * Indonesia_
  47. * Ireland_
  48. * Israel_
  49. * Italy_
  50. * Japan_
  51. * Kuwait_
  52. * Macedonia_
  53. * Mexico_
  54. * `The Netherlands`_
  55. * Norway_
  56. * Peru_
  57. * Poland_
  58. * Portugal_
  59. * Paraguay_
  60. * Romania_
  61. * Russia_
  62. * Slovakia_
  63. * Slovenia_
  64. * `South Africa`_
  65. * Spain_
  66. * Sweden_
  67. * Switzerland_
  68. * Turkey_
  69. * `United Kingdom`_
  70. * `United States of America`_
  71. * Uruguay_
  72. The ``django.contrib.localflavor`` package also includes a ``generic`` subpackage,
  73. containing useful code that is not specific to one particular country or culture.
  74. Currently, it defines date, datetime and split datetime input fields based on
  75. those from :doc:`forms </topics/forms/index>`, but with non-US default formats.
  76. Here's an example of how to use them::
  77. from django import forms
  78. from django.contrib.localflavor import generic
  79. class MyForm(forms.Form):
  80. my_date_field = generic.forms.DateField()
  81. .. _ISO 3166 country codes: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm
  82. .. _Argentina: `Argentina (ar)`_
  83. .. _Australia: `Australia (au)`_
  84. .. _Austria: `Austria (at)`_
  85. .. _Belgium: `Belgium (be)`_
  86. .. _Brazil: `Brazil (br)`_
  87. .. _Canada: `Canada (ca)`_
  88. .. _Chile: `Chile (cl)`_
  89. .. _China: `China (cn)`_
  90. .. _Colombia: `Colombia (co)`_
  91. .. _Croatia: `Croatia (hr)`_
  92. .. _Czech: `Czech (cz)`_
  93. .. _Ecuador: `Ecuador (ec)`_
  94. .. _Finland: `Finland (fi)`_
  95. .. _France: `France (fr)`_
  96. .. _Germany: `Germany (de)`_
  97. .. _The Netherlands: `The Netherlands (nl)`_
  98. .. _Iceland: `Iceland (is\_)`_
  99. .. _India: `India (in\_)`_
  100. .. _Indonesia: `Indonesia (id)`_
  101. .. _Ireland: `Ireland (ie)`_
  102. .. _Israel: `Israel (il)`_
  103. .. _Italy: `Italy (it)`_
  104. .. _Japan: `Japan (jp)`_
  105. .. _Kuwait: `Kuwait (kw)`_
  106. .. _Macedonia: `Macedonia (mk)`_
  107. .. _Mexico: `Mexico (mx)`_
  108. .. _Norway: `Norway (no)`_
  109. .. _Paraguay: `Paraguay (py)`_
  110. .. _Peru: `Peru (pe)`_
  111. .. _Poland: `Poland (pl)`_
  112. .. _Portugal: `Portugal (pt)`_
  113. .. _Romania: `Romania (ro)`_
  114. .. _Russia: `Russia (ru)`_
  115. .. _Slovakia: `Slovakia (sk)`_
  116. .. _Slovenia: `Slovenia (si)`_
  117. .. _South Africa: `South Africa (za)`_
  118. .. _Spain: `Spain (es)`_
  119. .. _Sweden: `Sweden (se)`_
  120. .. _Switzerland: `Switzerland (ch)`_
  121. .. _Turkey: `Turkey (tr)`_
  122. .. _United Kingdom: `United Kingdom (gb)`_
  123. .. _United States of America: `United States of America (us)`_
  124. .. _Uruguay: `Uruguay (uy)`_
  125. Internationalization of localflavor
  126. ===================================
  127. Localflavor has its own catalog of translations, in the directory
  128. ``django/contrib/localflavor/locale``, and it's not loaded automatically like
  129. Django's general catalog in ``django/conf/locale``. If you want localflavor's
  130. texts to be translated, like form fields error messages, you must include
  131. :mod:`django.contrib.localflavor` in the :setting:`INSTALLED_APPS` setting, so
  132. the internationalization system can find the catalog, as explained in
  133. :ref:`using-translations-in-your-own-projects`.
  134. Adding flavors
  135. ==============
  136. We'd love to add more of these to Django, so please `create a ticket`_ with
  137. any code you'd like to contribute. One thing we ask is that you please use
  138. Unicode objects (``u'mystring'``) for strings, rather than setting the encoding
  139. in the file. See any of the existing flavors for examples.
  140. .. _create a ticket: http://code.djangoproject.com/simpleticket
  141. Localflavor and backwards compatibility
  142. =======================================
  143. As documented in our :ref:`API stability
  144. <misc-api-stability-localflavor>` policy, Django will always attempt
  145. to make :mod:`django.contrib.localflavor` reflect the officially
  146. gazetted policies of the appropriate local government authority. For
  147. example, if a government body makes a change to add, alter, or remove
  148. a province (or state, or county), that change will be reflected in
  149. Django's localflavor in the next stable Django release.
  150. When a backwards-incompatible change is made (for example, the removal
  151. or renaming of a province) the localflavor in question will raise a
  152. warning when that localflavor is imported. This provides a runtime
  153. indication that something may require attention.
  154. However, once you have addressed the backwards compatibility (for
  155. example, auditing your code to see if any data migration is required),
  156. the warning serves no purpose. The warning can then be supressed.
  157. For example, to suppress the warnings raised by the Indonesian
  158. localflavor you would use the following code::
  159. import warnings
  160. warnings.filterwarnings('ignore',
  161. category=RuntimeWarning,
  162. module='django.contrib.localflavor.id')
  163. from django.contrib.localflavor.id import forms as id_forms
  164. Argentina (``ar``)
  165. =============================================
  166. .. class:: ar.forms.ARPostalCodeField
  167. A form field that validates input as either a classic four-digit Argentinian
  168. postal code or a CPA_.
  169. .. _CPA: http://www.correoargentino.com.ar/consulta_cpa/home.php
  170. .. class:: ar.forms.ARDNIField
  171. A form field that validates input as a Documento Nacional de Identidad (DNI)
  172. number.
  173. .. class:: ar.forms.ARCUITField
  174. A form field that validates input as a Codigo Unico de Identificacion
  175. Tributaria (CUIT) number.
  176. .. class:: ar.forms.ARProvinceSelect
  177. A ``Select`` widget that uses a list of Argentina's provinces and autonomous
  178. cities as its choices.
  179. Australia (``au``)
  180. =============================================
  181. .. versionadded:: 1.4
  182. .. class:: au.forms.AUPostCodeField
  183. A form field that validates input as an Australian postcode.
  184. .. class:: au.forms.AUPhoneNumberField
  185. A form field that validates input as an Australian phone number. Valid numbers
  186. have ten digits.
  187. .. class:: au.forms.AUStateSelect
  188. A ``Select`` widget that uses a list of Australian states/territories as its
  189. choices.
  190. .. class:: au.models.AUPhoneNumberField
  191. A model field that checks that the value is a valid Australian phone
  192. number (ten digits).
  193. .. class:: au.models.AUStateField
  194. A model field that forms represent as a ``forms.AUStateField`` field and
  195. stores the three-letter Australian state abbreviation in the database.
  196. .. class:: au.models.AUPostCodeField
  197. A model field that forms represent as a ``forms.AUPostCodeField`` field
  198. and stores the four-digit Australian postcode in the database.
  199. Austria (``at``)
  200. ================
  201. .. class:: at.forms.ATZipCodeField
  202. A form field that validates its input as an Austrian zip code, with the
  203. format XXXX (first digit must be greater than 0).
  204. .. class:: at.forms.ATStateSelect
  205. A ``Select`` widget that uses a list of Austrian states as its choices.
  206. .. class:: at.forms.ATSocialSecurityNumberField
  207. A form field that validates its input as an Austrian social security number.
  208. Belgium (``be``)
  209. ================
  210. .. versionadded:: 1.3
  211. .. class:: be.forms.BEPhoneNumberField
  212. A form field that validates input as a Belgium phone number, with one of
  213. the formats 0x xxx xx xx, 0xx xx xx xx, 04xx xx xx xx, 0x/xxx.xx.xx,
  214. 0xx/xx.xx.xx, 04xx/xx.xx.xx, 0x.xxx.xx.xx, 0xx.xx.xx.xx, 04xx.xx.xx.xx,
  215. 0xxxxxxxx or 04xxxxxxxx.
  216. .. class:: be.forms.BEPostalCodeField
  217. A form field that validates input as a Belgium postal code, in the range
  218. and format 1XXX-9XXX.
  219. .. class:: be.forms.BEProvinceSelect
  220. A ``Select`` widget that uses a list of Belgium provinces as its
  221. choices.
  222. .. class:: be.forms.BERegionSelect
  223. A ``Select`` widget that uses a list of Belgium regions as its
  224. choices.
  225. Brazil (``br``)
  226. ===============
  227. .. class:: br.forms.BRPhoneNumberField
  228. A form field that validates input as a Brazilian phone number, with the format
  229. XX-XXXX-XXXX.
  230. .. class:: br.forms.BRZipCodeField
  231. A form field that validates input as a Brazilian zip code, with the format
  232. XXXXX-XXX.
  233. .. class:: br.forms.BRStateSelect
  234. A ``Select`` widget that uses a list of Brazilian states/territories as its
  235. choices.
  236. .. class:: br.forms.BRCPFField
  237. A form field that validates input as `Brazilian CPF`_.
  238. Input can either be of the format XXX.XXX.XXX-VD or be a group of 11 digits.
  239. .. _Brazilian CPF: http://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F%C3%ADsicas
  240. .. class:: br.forms.BRCNPJField
  241. A form field that validates input as `Brazilian CNPJ`_.
  242. Input can either be of the format XX.XXX.XXX/XXXX-XX or be a group of 14
  243. digits.
  244. .. _Brazilian CNPJ: http://en.wikipedia.org/wiki/National_identification_number#Brazil
  245. Canada (``ca``)
  246. ===============
  247. .. class:: ca.forms.CAPhoneNumberField
  248. A form field that validates input as a Canadian phone number, with the format
  249. XXX-XXX-XXXX.
  250. .. class:: ca.forms.CAPostalCodeField
  251. A form field that validates input as a Canadian postal code, with the format
  252. XXX XXX.
  253. .. class:: ca.forms.CAProvinceField
  254. A form field that validates input as a Canadian province name or abbreviation.
  255. .. class:: ca.forms.CASocialInsuranceNumberField
  256. A form field that validates input as a Canadian Social Insurance Number (SIN).
  257. A valid number must have the format XXX-XXX-XXX and pass a `Luhn mod-10
  258. checksum`_.
  259. .. _Luhn mod-10 checksum: http://en.wikipedia.org/wiki/Luhn_algorithm
  260. .. class:: ca.forms.CAProvinceSelect
  261. A ``Select`` widget that uses a list of Canadian provinces and territories as
  262. its choices.
  263. Chile (``cl``)
  264. ==============
  265. .. class:: cl.forms.CLRutField
  266. A form field that validates input as a Chilean national identification number
  267. ('Rol Unico Tributario' or RUT). The valid format is XX.XXX.XXX-X.
  268. .. class:: cl.forms.CLRegionSelect
  269. A ``Select`` widget that uses a list of Chilean regions (Regiones) as its
  270. choices.
  271. China (``cn``)
  272. ==============
  273. .. versionadded:: 1.4
  274. .. class:: cn.forms.CNProvinceSelect
  275. A ``Select`` widget that uses a list of Chinese regions as its choices.
  276. .. class:: cn.forms.CNPostCodeField
  277. A form field that validates input as a Chinese post code.
  278. Valid formats are XXXXXX where X is digit.
  279. .. class:: cn.forms.CNIDCardField
  280. A form field that validates input as a Chinese Identification Card Number.
  281. Both 1st and 2nd generation ID Card Number are validated.
  282. .. class:: cn.forms.CNPhoneNumberField
  283. A form field that validates input as a Chinese phone number.
  284. Valid formats are 0XX-XXXXXXXX, composed of 3 or 4 digits of region code
  285. and 7 or 8 digits of phone number.
  286. .. class:: cn.forms.CNCellNumberField
  287. A form field that validates input as a Chinese mobile phone number.
  288. Valid formats are like 1XXXXXXXXXX, where X is digit.
  289. The second digit could only be 3, 5 and 8.
  290. Colombia (``co``)
  291. =================
  292. .. versionadded:: 1.4
  293. .. class:: co.forms.CoDepartmentSelect
  294. A ``Select`` widget that uses a list of Colombian departments
  295. as its choices.
  296. Croatia (``hr``)
  297. ================
  298. .. versionadded:: 1.4
  299. .. class:: hr.forms.HRCountySelect
  300. A ``Select`` widget that uses a list of counties of Croatia as its choices.
  301. .. class:: hr.forms.HRPhoneNumberPrefixSelect
  302. A ``Select`` widget that uses a list of phone number prefixes of Croatia as
  303. its choices.
  304. .. class:: hr.forms.HRLicensePlatePrefixSelect
  305. A ``Select`` widget that uses a list of vehicle license plate prefixes of
  306. Croatia as its choices.
  307. .. class:: hr.forms.HRPhoneNumberField
  308. A form field that validates input as a phone number of Croatia.
  309. A valid format is a country code or a leading zero, area code prefix, 6 or 7
  310. digit number; e.g. +385XXXXXXXX or 0XXXXXXXX
  311. Validates fixed, mobile and FGSM numbers. Normalizes to a full number with
  312. country code (+385 prefix).
  313. .. class:: hr.forms.HRLicensePlateField
  314. A form field that validates input as a vehicle license plate of Croatia.
  315. Normalizes to the specific format XX YYYY-XX where X is a letter and Y a
  316. digit. There can be three or four digits.
  317. Suffix is constructed from the shared letters of the Croatian and English
  318. alphabets.
  319. It is used for standardized license plates only. Special cases like license
  320. plates for oldtimers, temporary license plates, government institution
  321. license plates and customized license plates are not covered by this field.
  322. .. class:: hr.forms.HRPostalCodeField
  323. A form field that validates input as a postal code of Croatia.
  324. It consists of exactly five digits ranging from 10000 to 59999 inclusive.
  325. .. class:: hr.forms.HROIBField
  326. A form field that validates input as a Personal Identification Number (OIB)
  327. of Croatia.
  328. It consists of exactly eleven digits.
  329. .. class:: hr.forms.HRJMBGField
  330. A form field that validates input as a Unique Master Citizen Number (JMBG).
  331. The number is still in use in Croatia, but it is being replaced by OIB.
  332. This field works for other ex-Yugoslavia countries as well where the JMBG is
  333. still in use.
  334. The area segment of the JMBG is not validated because the citizens might
  335. have emigrated to another ex-Yugoslavia country.
  336. The number consists of exactly thirteen digits.
  337. .. class:: hr.forms.HRJMBAGField
  338. A form field that validates input as a Unique Master Academic Citizen Number
  339. (JMBAG) of Croatia.
  340. This number is used by college students and professors in Croatia.
  341. The number consists of exactly nineteen digits.
  342. Czech (``cz``)
  343. ==============
  344. .. class:: cz.forms.CZPostalCodeField
  345. A form field that validates input as a Czech postal code. Valid formats
  346. are XXXXX or XXX XX, where X is a digit.
  347. .. class:: cz.forms.CZBirthNumberField
  348. A form field that validates input as a Czech Birth Number.
  349. A valid number must be in format XXXXXX/XXXX (slash is optional).
  350. .. class:: cz.forms.CZICNumberField
  351. A form field that validates input as a Czech IC number field.
  352. .. class:: cz.forms.CZRegionSelect
  353. A ``Select`` widget that uses a list of Czech regions as its choices.
  354. Ecuador (``ec``)
  355. ================
  356. .. versionadded:: 1.4
  357. .. class:: ec.forms.EcProvinceSelect
  358. A ``Select`` widget that uses a list of Ecuatorian provinces as
  359. its choices.
  360. Finland (``fi``)
  361. ================
  362. .. class:: fi.forms.FISocialSecurityNumber
  363. A form field that validates input as a Finnish social security number.
  364. .. class:: fi.forms.FIZipCodeField
  365. A form field that validates input as a Finnish zip code. Valid codes
  366. consist of five digits.
  367. .. class:: fi.forms.FIMunicipalitySelect
  368. A ``Select`` widget that uses a list of Finnish municipalities as its
  369. choices.
  370. France (``fr``)
  371. ===============
  372. .. class:: fr.forms.FRPhoneNumberField
  373. A form field that validates input as a French local phone number. The
  374. correct format is 0X XX XX XX XX. 0X.XX.XX.XX.XX and 0XXXXXXXXX validate
  375. but are corrected to 0X XX XX XX XX.
  376. .. class:: fr.forms.FRZipCodeField
  377. A form field that validates input as a French zip code. Valid codes
  378. consist of five digits.
  379. .. class:: fr.forms.FRDepartmentSelect
  380. A ``Select`` widget that uses a list of French departments as its choices.
  381. Germany (``de``)
  382. ================
  383. .. class:: de.forms.DEIdentityCardNumberField
  384. A form field that validates input as a German identity card number
  385. (Personalausweis_). Valid numbers have the format
  386. XXXXXXXXXXX-XXXXXXX-XXXXXXX-X, with no group consisting entirely of zeroes.
  387. .. _Personalausweis: http://de.wikipedia.org/wiki/Personalausweis
  388. .. class:: de.forms.DEZipCodeField
  389. A form field that validates input as a German zip code. Valid codes
  390. consist of five digits.
  391. .. class:: de.forms.DEStateSelect
  392. A ``Select`` widget that uses a list of German states as its choices.
  393. The Netherlands (``nl``)
  394. ========================
  395. .. class:: nl.forms.NLPhoneNumberField
  396. A form field that validates input as a Dutch telephone number.
  397. .. class:: nl.forms.NLSofiNumberField
  398. A form field that validates input as a Dutch social security number
  399. (SoFI/BSN).
  400. .. class:: nl.forms.NLZipCodeField
  401. A form field that validates input as a Dutch zip code.
  402. .. class:: nl.forms.NLProvinceSelect
  403. A ``Select`` widget that uses a list of Dutch provinces as its list of
  404. choices.
  405. Iceland (``is_``)
  406. =================
  407. .. class:: is_.forms.ISIdNumberField
  408. A form field that validates input as an Icelandic identification number
  409. (kennitala). The format is XXXXXX-XXXX.
  410. .. class:: is_.forms.ISPhoneNumberField
  411. A form field that validates input as an Icelandtic phone number (seven
  412. digits with an optional hyphen or space after the first three digits).
  413. .. class:: is_.forms.ISPostalCodeSelect
  414. A ``Select`` widget that uses a list of Icelandic postal codes as its
  415. choices.
  416. India (``in_``)
  417. ===============
  418. .. class:: in_.forms.INStateField
  419. A form field that validates input as an Indian state/territory name or
  420. abbreviation. Input is normalized to the standard two-letter vehicle
  421. registration abbreviation for the given state or territory.
  422. .. class:: in_.forms.INZipCodeField
  423. A form field that validates input as an Indian zip code, with the
  424. format XXXXXXX.
  425. .. class:: in_.forms.INStateSelect
  426. A ``Select`` widget that uses a list of Indian states/territories as its
  427. choices.
  428. .. versionadded:: 1.4
  429. .. class:: in_.forms.INPhoneNumberField
  430. A form field that validates that the data is a valid Indian phone number,
  431. including the STD code. It's normalised to 0XXX-XXXXXXX or 0XXX XXXXXXX
  432. format. The first string is the STD code which is a '0' followed by 2-4
  433. digits. The second string is 8 digits if the STD code is 3 digits, 7
  434. digits if the STD code is 4 digits and 6 digits if the STD code is 5
  435. digits. The second string will start with numbers between 1 and 6. The
  436. separator is either a space or a hyphen.
  437. Ireland (``ie``)
  438. ================
  439. .. class:: ie.forms.IECountySelect
  440. A ``Select`` widget that uses a list of Irish Counties as its choices.
  441. Indonesia (``id``)
  442. ==================
  443. .. class:: id.forms.IDPostCodeField
  444. A form field that validates input as an Indonesian post code field.
  445. .. class:: id.forms.IDProvinceSelect
  446. A ``Select`` widget that uses a list of Indonesian provinces as its choices.
  447. .. versionchanged:: 1.3
  448. The province "Nanggroe Aceh Darussalam (NAD)" has been removed
  449. from the province list in favor of the new official designation
  450. "Aceh (ACE)".
  451. .. class:: id.forms.IDPhoneNumberField
  452. A form field that validates input as an Indonesian telephone number.
  453. .. class:: id.forms.IDLicensePlatePrefixSelect
  454. A ``Select`` widget that uses a list of Indonesian license plate
  455. prefix code as its choices.
  456. .. class:: id.forms.IDLicensePlateField
  457. A form field that validates input as an Indonesian vehicle license plate.
  458. .. class:: id.forms.IDNationalIdentityNumberField
  459. A form field that validates input as an Indonesian national identity
  460. number (`NIK`_/KTP). The output will be in the format of
  461. 'XX.XXXX.DDMMYY.XXXX'. Dots or spaces can be used in the input to break
  462. down the numbers.
  463. .. _NIK: http://en.wikipedia.org/wiki/Indonesian_identity_card
  464. Israel (``il``)
  465. ===============
  466. .. class:: il.forms.ILPostalCodeField
  467. A form field that validates its input as an Israeli five-digit postal code.
  468. .. class:: il.forms.ILIDNumberField
  469. A form field that validates its input as an `Israeli identification number`_.
  470. The output will be in the format of a 2-9 digit number, consisting of a
  471. 1-8 digit ID number followed by a single checksum digit, calculated using
  472. the `Luhn algorithm`_.
  473. Input may contain an optional hyphen separating the ID number from the checksum
  474. digit.
  475. .. _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)
  476. .. _Luhn algorithm: http://en.wikipedia.org/wiki/Luhn_algorithm
  477. Italy (``it``)
  478. ==============
  479. .. class:: it.forms.ITSocialSecurityNumberField
  480. A form field that validates input as an Italian social security number
  481. (`codice fiscale`_).
  482. .. _codice fiscale: http://www.agenziaentrate.it/ilwwcm/connect/Nsi/Servizi/Codice+fiscale+-+tessera+sanitaria/NSI+Informazioni+sulla+codificazione+delle+persone+fisiche
  483. .. class:: it.forms.ITVatNumberField
  484. A form field that validates Italian VAT numbers (partita IVA).
  485. .. class:: it.forms.ITZipCodeField
  486. A form field that validates input as an Italian zip code. Valid codes
  487. must have five digits.
  488. .. class:: it.forms.ITProvinceSelect
  489. A ``Select`` widget that uses a list of Italian provinces as its choices.
  490. .. class:: it.forms.ITRegionSelect
  491. A ``Select`` widget that uses a list of Italian regions as its choices.
  492. Japan (``jp``)
  493. ==============
  494. .. class:: jp.forms.JPPostalCodeField
  495. A form field that validates input as a Japanese postcode. It accepts seven
  496. digits, with or without a hyphen.
  497. .. class:: jp.forms.JPPrefectureSelect
  498. A ``Select`` widget that uses a list of Japanese prefectures as its choices.
  499. Kuwait (``kw``)
  500. ===============
  501. .. class:: kw.forms.KWCivilIDNumberField
  502. A form field that validates input as a Kuwaiti Civil ID number. A valid
  503. Civil ID number must obey the following rules:
  504. * The number consist of 12 digits.
  505. * The birthdate of the person is a valid date.
  506. * The calculated checksum equals to the last digit of the Civil ID.
  507. Macedonia (``mk``)
  508. ===================
  509. .. versionadded:: 1.4
  510. .. class:: mk.forms.MKIdentityCardNumberField
  511. A form field that validates input as a Macedonian identity card number.
  512. Both old and new identity card numbers are supported.
  513. .. class:: mk.forms.MKMunicipalitySelect
  514. A form ``Select`` widget that uses a list of Macedonian municipalities as
  515. choices.
  516. .. class:: mk.forms.UMCNField
  517. A form field that validates input as a unique master citizen
  518. number.
  519. The format of the unique master citizen number is not unique
  520. to Macedonia. For more information see:
  521. https://secure.wikimedia.org/wikipedia/en/wiki/Unique_Master_Citizen_Number
  522. A value will pass validation if it complies to the following rules:
  523. * Consists of exactly 13 digits
  524. * The first 7 digits represent a valid past date in the format DDMMYYY
  525. * The last digit of the UMCN passes a checksum test
  526. .. class:: mk.models.MKIdentityCardNumberField
  527. A model field that forms represent as a
  528. ``forms.MKIdentityCardNumberField`` field.
  529. .. class:: mk.models.MKMunicipalityField
  530. A model field that forms represent as a
  531. ``forms.MKMunicipalitySelect`` and stores the 2 character code of the
  532. municipality in the database.
  533. .. class:: mk.models.UMCNField
  534. A model field that forms represent as a ``forms.UMCNField`` field.
  535. Mexico (``mx``)
  536. ===============
  537. .. class:: mx.forms.MXZipCodeField
  538. .. versionadded:: 1.4
  539. A form field that accepts a Mexican Zip Code.
  540. More info about this: List of postal codes in Mexico (zipcodes_)
  541. .. _zipcodes: http://en.wikipedia.org/wiki/List_of_postal_codes_in_Mexico
  542. .. class:: mx.forms.MXRFCField
  543. .. versionadded:: 1.4
  544. A form field that validates a Mexican *Registro Federal de Contribuyentes* for
  545. either **Persona física** or **Persona moral**. This field accepts RFC strings
  546. whether or not it contains a *homoclave*.
  547. More info about this: Registro Federal de Contribuyentes (rfc_)
  548. .. _rfc: http://es.wikipedia.org/wiki/Registro_Federal_de_Contribuyentes_(M%C3%A9xico)
  549. .. class:: mx.forms.MXCURPField
  550. .. versionadded:: 1.4
  551. A field that validates a Mexican *Clave Única de Registro de Población*.
  552. More info about this: Clave Unica de Registro de Poblacion (curp_)
  553. .. _curp: http://www.condusef.gob.mx/index.php/clave-unica-de-registro-de-poblacion-curp
  554. .. class:: mx.forms.MXStateSelect
  555. A ``Select`` widget that uses a list of Mexican states as its choices.
  556. .. class:: mx.models.MXStateField
  557. .. versionadded:: 1.4
  558. A model field that stores the three-letter Mexican state abbreviation in the
  559. database.
  560. .. class:: mx.models.MXZipCodeField
  561. .. versionadded:: 1.4
  562. A model field that forms represent as a ``forms.MXZipCodeField`` field and
  563. stores the five-digit Mexican zip code.
  564. .. class:: mx.models.MXRFCField
  565. .. versionadded:: 1.4
  566. A model field that forms represent as a ``forms.MXRFCField`` field and
  567. stores the value of a valid Mexican RFC.
  568. .. class:: mx.models.MXCURPField
  569. .. versionadded:: 1.4
  570. A model field that forms represent as a ``forms.MXCURPField`` field and
  571. stores the value of a valid Mexican CURP.
  572. Additionally, a choice tuple is provided in ``django.contrib.localflavor.mx.mx_states``,
  573. allowing customized model and form fields, and form presentations, for subsets of
  574. Mexican states abbreviations:
  575. .. data:: mx.mx_states.STATE_CHOICES
  576. A tuple of choices of the states abbreviations for all 31 Mexican states,
  577. plus the `Distrito Federal`.
  578. Norway (``no``)
  579. ===============
  580. .. class:: no.forms.NOSocialSecurityNumber
  581. A form field that validates input as a Norwegian social security number
  582. (personnummer_).
  583. .. _personnummer: http://no.wikipedia.org/wiki/Personnummer
  584. .. class:: no.forms.NOZipCodeField
  585. A form field that validates input as a Norwegian zip code. Valid codes
  586. have four digits.
  587. .. class:: no.forms.NOMunicipalitySelect
  588. A ``Select`` widget that uses a list of Norwegian municipalities (fylker) as
  589. its choices.
  590. Paraguay (``py``)
  591. =================
  592. .. versionadded:: 1.4
  593. .. class:: py.forms.PyDepartmentSelect
  594. A ``Select`` widget with a list of Paraguayan departments as choices.
  595. .. class:: py.forms.PyNumberedDepartmentSelect
  596. A ``Select`` widget with a roman numbered list of Paraguayan departments as choices.
  597. Peru (``pe``)
  598. =============
  599. .. class:: pe.forms.PEDNIField
  600. A form field that validates input as a DNI (Peruvian national identity)
  601. number.
  602. .. class:: pe.forms.PERUCField
  603. A form field that validates input as an RUC (Registro Unico de
  604. Contribuyentes) number. Valid RUC numbers have 11 digits.
  605. .. class:: pe.forms.PEDepartmentSelect
  606. A ``Select`` widget that uses a list of Peruvian Departments as its choices.
  607. Poland (``pl``)
  608. ===============
  609. .. class:: pl.forms.PLPESELField
  610. A form field that validates input as a Polish national identification number
  611. (PESEL_).
  612. .. _PESEL: http://en.wikipedia.org/wiki/PESEL
  613. .. versionadded:: 1.4
  614. .. class:: pl.forms.PLNationalIDCardNumberField
  615. A form field that validates input as a Polish National ID Card number. The
  616. valid format is AAAXXXXXX, where A is letter (A-Z), X is digit and left-most
  617. digit is checksum digit. More information about checksum calculation algorithm
  618. see `Polish identity card`_.
  619. .. _`Polish identity card`: http://en.wikipedia.org/wiki/Polish_identity_card
  620. .. class:: pl.forms.PLREGONField
  621. A form field that validates input as a Polish National Official Business
  622. Register Number (REGON_), having either seven or nine digits. The checksum
  623. algorithm used for REGONs is documented at
  624. http://wipos.p.lodz.pl/zylla/ut/nip-rego.html.
  625. .. _REGON: http://www.stat.gov.pl/bip/regon_ENG_HTML.htm
  626. .. class:: pl.forms.PLPostalCodeField
  627. A form field that validates input as a Polish postal code. The valid format
  628. is XX-XXX, where X is a digit.
  629. .. class:: pl.forms.PLNIPField
  630. A form field that validates input as a Polish Tax Number (NIP). Valid
  631. formats are XXX-XXX-XX-XX or XX-XX-XXX-XXX. The checksum algorithm used
  632. for NIPs is documented at http://wipos.p.lodz.pl/zylla/ut/nip-rego.html.
  633. .. class:: pl.forms.PLCountySelect
  634. A ``Select`` widget that uses a list of Polish administrative units as its
  635. choices.
  636. .. class:: pl.forms.PLProvinceSelect
  637. A ``Select`` widget that uses a list of Polish voivodeships (administrative
  638. provinces) as its choices.
  639. Portugal (``pt``)
  640. =================
  641. .. class:: pt.forms.PTZipCodeField
  642. A form field that validates input as a Portuguese zip code.
  643. .. class:: pt.forms.PTPhoneNumberField
  644. A form field that validates input as a Portuguese phone number.
  645. Valid numbers have 9 digits (may include spaces) or start by 00
  646. or + (international).
  647. Romania (``ro``)
  648. ================
  649. .. class:: ro.forms.ROCIFField
  650. A form field that validates Romanian fiscal identification codes (CIF). The
  651. return value strips the leading RO, if given.
  652. .. class:: ro.forms.ROCNPField
  653. A form field that validates Romanian personal numeric codes (CNP).
  654. .. class:: ro.forms.ROCountyField
  655. A form field that validates its input as a Romanian county (judet) name or
  656. abbreviation. It normalizes the input to the standard vehicle registration
  657. abbreviation for the given county. This field will only accept names written
  658. with diacritics; consider using ROCountySelect as an alternative.
  659. .. class:: ro.forms.ROCountySelect
  660. A ``Select`` widget that uses a list of Romanian counties (judete) as its
  661. choices.
  662. .. class:: ro.forms.ROIBANField
  663. A form field that validates its input as a Romanian International Bank
  664. Account Number (IBAN). The valid format is ROXX-XXXX-XXXX-XXXX-XXXX-XXXX,
  665. with or without hyphens.
  666. .. class:: ro.forms.ROPhoneNumberField
  667. A form field that validates Romanian phone numbers, short special numbers
  668. excluded.
  669. .. class:: ro.forms.ROPostalCodeField
  670. A form field that validates Romanian postal codes.
  671. Russia (``ru``)
  672. ===============
  673. .. versionadded:: 1.4
  674. .. class:: ru.forms.RUPostalCodeField
  675. Russian Postal code field. The valid format is XXXXXX, where X is any
  676. digit and the first digit is not zero.
  677. .. class:: ru.forms.RUCountySelect
  678. A ``Select`` widget that uses a list of Russian Counties as its choices.
  679. .. class:: ru.forms.RURegionSelect
  680. A ``Select`` widget that uses a list of Russian Regions as its choices.
  681. .. class:: ru.forms.RUPassportNumberField
  682. Russian internal passport number. The valid format is XXXX XXXXXX, where X
  683. is any digit.
  684. .. class:: ru.forms.RUAlienPassportNumberField
  685. Russian alien's passport number. The valid format is XX XXXXXXX, where X
  686. is any digit.
  687. Slovakia (``sk``)
  688. =================
  689. .. class:: sk.forms.SKPostalCodeField
  690. A form field that validates input as a Slovak postal code. Valid formats
  691. are XXXXX or XXX XX, where X is a digit.
  692. .. class:: sk.forms.SKDistrictSelect
  693. A ``Select`` widget that uses a list of Slovak districts as its choices.
  694. .. class:: sk.forms.SKRegionSelect
  695. A ``Select`` widget that uses a list of Slovak regions as its choices.
  696. Slovenia (``si``)
  697. =================
  698. .. class:: si.forms.SIEMSOField
  699. A form field that validates input as Slovenian personal identification
  700. number and stores gender and birthday to self.info dictionary.
  701. .. class:: si.forms.SITaxNumberField
  702. A form field that validates input as a Slovenian tax number. Valid input
  703. is SIXXXXXXXX or XXXXXXXX.
  704. .. class:: si.forms.SIPhoneNumberField
  705. A form field that validates input as a Slovenian phone number. Phone
  706. number must contain at least local area code with optional country code.
  707. .. class:: si.forms.SIPostalCodeField
  708. A form field that provides a choice field of major Slovenian postal
  709. codes.
  710. .. class:: si.forms.SIPostalCodeSelect
  711. A ``Select`` widget that uses a list of major Slovenian postal codes as
  712. its choices.
  713. South Africa (``za``)
  714. =====================
  715. .. class:: za.forms.ZAIDField
  716. A form field that validates input as a South African ID number. Validation
  717. uses the Luhn checksum and a simplistic (i.e., not entirely accurate) check
  718. for birth date.
  719. .. class:: za.forms.ZAPostCodeField
  720. A form field that validates input as a South African postcode. Valid
  721. postcodes must have four digits.
  722. Spain (``es``)
  723. ==============
  724. .. class:: es.forms.ESIdentityCardNumberField
  725. A form field that validates input as a Spanish NIF/NIE/CIF (Fiscal
  726. Identification Number) code.
  727. .. class:: es.forms.ESCCCField
  728. A form field that validates input as a Spanish bank account number (Codigo
  729. Cuenta Cliente or CCC). A valid CCC number has the format
  730. EEEE-OOOO-CC-AAAAAAAAAA, where the E, O, C and A digits denote the entity,
  731. office, checksum and account, respectively. The first checksum digit
  732. validates the entity and office. The second checksum digit validates the
  733. account. It is also valid to use a space as a delimiter, or to use no
  734. delimiter.
  735. .. class:: es.forms.ESPhoneNumberField
  736. A form field that validates input as a Spanish phone number. Valid numbers
  737. have nine digits, the first of which is 6, 8 or 9.
  738. .. class:: es.forms.ESPostalCodeField
  739. A form field that validates input as a Spanish postal code. Valid codes
  740. have five digits, the first two being in the range 01 to 52, representing
  741. the province.
  742. .. class:: es.forms.ESProvinceSelect
  743. A ``Select`` widget that uses a list of Spanish provinces as its choices.
  744. .. class:: es.forms.ESRegionSelect
  745. A ``Select`` widget that uses a list of Spanish regions as its choices.
  746. Sweden (``se``)
  747. ===============
  748. .. class:: se.forms.SECountySelect
  749. A Select form widget that uses a list of the Swedish counties (län) as its
  750. choices.
  751. The cleaned value is the official county code -- see
  752. http://en.wikipedia.org/wiki/Counties_of_Sweden for a list.
  753. .. class:: se.forms.SEOrganisationNumber
  754. A form field that validates input as a Swedish organisation number
  755. (organisationsnummer).
  756. It accepts the same input as SEPersonalIdentityField (for sole
  757. proprietorships (enskild firma). However, co-ordination numbers are not
  758. accepted.
  759. It also accepts ordinary Swedish organisation numbers with the format
  760. NNNNNNNNNN.
  761. The return value will be YYYYMMDDXXXX for sole proprietors, and NNNNNNNNNN
  762. for other organisations.
  763. .. class:: se.forms.SEPersonalIdentityNumber
  764. A form field that validates input as a Swedish personal identity number
  765. (personnummer).
  766. The correct formats are YYYYMMDD-XXXX, YYYYMMDDXXXX, YYMMDD-XXXX,
  767. YYMMDDXXXX and YYMMDD+XXXX.
  768. A \+ indicates that the person is older than 100 years, which will be taken
  769. into consideration when the date is validated.
  770. The checksum will be calculated and checked. The birth date is checked
  771. to be a valid date.
  772. By default, co-ordination numbers (samordningsnummer) will be accepted. To
  773. only allow real personal identity numbers, pass the keyword argument
  774. coordination_number=False to the constructor.
  775. The cleaned value will always have the format YYYYMMDDXXXX.
  776. .. class:: se.forms.SEPostalCodeField
  777. A form field that validates input as a Swedish postal code (postnummer).
  778. Valid codes consist of five digits (XXXXX). The number can optionally be
  779. formatted with a space after the third digit (XXX XX).
  780. The cleaned value will never contain the space.
  781. Switzerland (``ch``)
  782. ====================
  783. .. class:: ch.forms.CHIdentityCardNumberField
  784. A form field that validates input as a Swiss identity card number.
  785. A valid number must confirm to the X1234567<0 or 1234567890 format and
  786. have the correct checksums.
  787. .. class:: ch.forms.CHPhoneNumberField
  788. A form field that validates input as a Swiss phone number. The correct
  789. format is 0XX XXX XX XX. 0XX.XXX.XX.XX and 0XXXXXXXXX validate but are
  790. corrected to 0XX XXX XX XX.
  791. .. class:: ch.forms.CHZipCodeField
  792. A form field that validates input as a Swiss zip code. Valid codes
  793. consist of four digits.
  794. .. class:: ch.forms.CHStateSelect
  795. A ``Select`` widget that uses a list of Swiss states as its choices.
  796. Turkey (``tr``)
  797. ===============
  798. .. class:: tr.forms.TRZipCodeField
  799. A form field that validates input as a Turkish zip code. Valid codes
  800. consist of five digits.
  801. .. class:: tr.forms.TRPhoneNumberField
  802. A form field that validates input as a Turkish phone number. The correct
  803. format is 0xxx xxx xxxx. +90xxx xxx xxxx and inputs without spaces also
  804. validates. The result is normalized to xxx xxx xxxx format.
  805. .. class:: tr.forms.TRIdentificationNumberField
  806. A form field that validates input as a TR identification number. A valid
  807. number must satisfy the following:
  808. * The number consist of 11 digits.
  809. * The first digit cannot be 0.
  810. * (sum(1st, 3rd, 5th, 7th, 9th)*7 - sum(2nd,4th,6th,8th)) % 10) must be
  811. equal to the 10th digit.
  812. * (sum(1st to 10th) % 10) must be equal to the 11th digit.
  813. .. class:: tr.forms.TRProvinceSelect
  814. A ``select`` widget that uses a list of Turkish provinces as its choices.
  815. United Kingdom (``gb``)
  816. =======================
  817. .. class:: gb.forms.GBPostcodeField
  818. A form field that validates input as a UK postcode. The regular
  819. expression used is sourced from the schema for British Standard BS7666
  820. address types at http://www.cabinetoffice.gov.uk/media/291293/bs7666-v2-0.xml.
  821. .. class:: gb.forms.GBCountySelect
  822. A ``Select`` widget that uses a list of UK counties/regions as its choices.
  823. .. class:: gb.forms.GBNationSelect
  824. A ``Select`` widget that uses a list of UK nations as its choices.
  825. United States of America (``us``)
  826. =================================
  827. .. class:: us.forms.USPhoneNumberField
  828. A form field that validates input as a U.S. phone number.
  829. .. class:: us.forms.USSocialSecurityNumberField
  830. A form field that validates input as a U.S. Social Security Number (SSN).
  831. A valid SSN must obey the following rules:
  832. * Format of XXX-XX-XXXX
  833. * No group of digits consisting entirely of zeroes
  834. * Leading group of digits cannot be 666
  835. * Number not in promotional block 987-65-4320 through 987-65-4329
  836. * Number not one known to be invalid due to widespread promotional
  837. use or distribution (e.g., the Woolworth's number or the 1962
  838. promotional number)
  839. .. class:: us.forms.USStateField
  840. A form field that validates input as a U.S. state name or abbreviation. It
  841. normalizes the input to the standard two-letter postal service abbreviation
  842. for the given state.
  843. .. class:: us.forms.USZipCodeField
  844. A form field that validates input as a U.S. ZIP code. Valid formats are
  845. XXXXX or XXXXX-XXXX.
  846. .. class:: us.forms.USStateSelect
  847. A form ``Select`` widget that uses a list of U.S. states/territories as its
  848. choices.
  849. .. class:: us.forms.USPSSelect
  850. A form ``Select`` widget that uses a list of U.S Postal Service
  851. state, territory and country abbreviations as its choices.
  852. .. class:: us.models.PhoneNumberField
  853. A :class:`CharField` that checks that the value is a valid U.S.A.-style phone
  854. number (in the format ``XXX-XXX-XXXX``).
  855. .. class:: us.models.USStateField
  856. A model field that forms represent as a ``forms.USStateField`` field and
  857. stores the two-letter U.S. state abbreviation in the database.
  858. .. class:: us.models.USPostalCodeField
  859. A model field that forms represent as a ``forms.USPSSelect`` field
  860. and stores the two-letter U.S Postal Service abbreviation in the
  861. database.
  862. Additionally, a variety of choice tuples are provided in
  863. ``django.contrib.localflavor.us.us_states``, allowing customized model
  864. and form fields, and form presentations, for subsets of U.S states,
  865. territories and U.S Postal Service abbreviations:
  866. .. data:: us.us_states.CONTIGUOUS_STATES
  867. A tuple of choices of the postal abbreviations for the
  868. contiguous or "lower 48" states (i.e., all except Alaska and
  869. Hawaii), plus the District of Columbia.
  870. .. data:: us.us_states.US_STATES
  871. A tuple of choices of the postal abbreviations for all
  872. 50 U.S. states, plus the District of Columbia.
  873. .. data:: us.us_states.US_TERRITORIES
  874. A tuple of choices of the postal abbreviations for U.S
  875. territories: American Samoa, Guam, the Northern Mariana Islands,
  876. Puerto Rico and the U.S. Virgin Islands.
  877. .. data:: us.us_states.ARMED_FORCES_STATES
  878. A tuple of choices of the postal abbreviations of the three U.S
  879. military postal "states": Armed Forces Americas, Armed Forces
  880. Europe and Armed Forces Pacific.
  881. .. data:: us.us_states.COFA_STATES
  882. A tuple of choices of the postal abbreviations of the three
  883. independent nations which, under the Compact of Free Association,
  884. are served by the U.S. Postal Service: the Federated States of
  885. Micronesia, the Marshall Islands and Palau.
  886. .. data:: us.us_states.OBSOLETE_STATES
  887. A tuple of choices of obsolete U.S Postal Service state
  888. abbreviations: the former abbreviation for the Northern Mariana
  889. Islands, plus the Panama Canal Zone, the Philippines and the
  890. former Pacific trust territories.
  891. .. data:: us.us_states.STATE_CHOICES
  892. A tuple of choices of all postal abbreviations corresponding to U.S states or
  893. territories, and the District of Columbia..
  894. .. data:: us.us_states.USPS_CHOICES
  895. A tuple of choices of all postal abbreviations recognized by the
  896. U.S Postal Service (including all states and territories, the
  897. District of Columbia, armed forces "states" and independent
  898. nations serviced by USPS).
  899. Uruguay (``uy``)
  900. ================
  901. .. class:: uy.forms.UYCIField
  902. A field that validates Uruguayan 'Cedula de identidad' (CI) numbers.
  903. .. class:: uy.forms.UYDepartamentSelect
  904. A ``Select`` widget that uses a list of Uruguayan departments as its
  905. choices.