summaryrefslogtreecommitdiff
path: root/docs/localflavor.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/localflavor.txt')
-rw-r--r--docs/localflavor.txt78
1 files changed, 73 insertions, 5 deletions
diff --git a/docs/localflavor.txt b/docs/localflavor.txt
index 5a2e5b8fda..71e353c5d8 100644
--- a/docs/localflavor.txt
+++ b/docs/localflavor.txt
@@ -11,7 +11,7 @@ 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 from
-the newforms_ framework -- for example, a ``USStateField`` that knows how to
+the forms_ framework -- for example, a ``USStateField`` that knows how to
validate U.S. state abbreviations, and a ``FISocialSecurityNumber`` that knows
how to validate Finnish social security numbers.
@@ -19,7 +19,7 @@ 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 newforms as forms
+ from django import forms
from django.contrib.localflavor import fr
class MyForm(forms.Form):
@@ -32,6 +32,7 @@ Countries currently supported by ``localflavor`` are:
* Argentina_
* Australia_
+ * Austria_
* Brazil_
* Canada_
* Chile_
@@ -47,6 +48,7 @@ Countries currently supported by ``localflavor`` are:
* Norway_
* Peru_
* Poland_
+ * Romania_
* Slovakia_
* `South Africa`_
* Spain_
@@ -57,10 +59,10 @@ Countries currently supported by ``localflavor`` are:
The ``localflavor`` package also includes a ``generic`` subpackage, containing
useful code that is not specific to one particular country or culture.
Currently, it defines date and datetime input fields based on those from
-newforms_, but with non-US default formats. Here's an example of how to use
+forms_, but with non-US default formats. Here's an example of how to use
them::
- from django import newforms as forms
+ from django import forms
from django.contrib.localflavor import generic
class MyForm(forms.Form):
@@ -69,6 +71,7 @@ them::
.. _ISO 3166 country codes: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm
.. _Argentina: `Argentina (django.contrib.localflavor.ar)`_
.. _Australia: `Australia (django.contrib.localflavor.au)`_
+.. _Austria: `Austria (django.contrib.localflavor.at)`_
.. _Brazil: `Brazil (django.contrib.localflavor.br)`_
.. _Canada: `Canada (django.contrib.localflavor.ca)`_
.. _Chile: `Chile (django.contrib.localflavor.cl)`_
@@ -84,13 +87,14 @@ them::
.. _Norway: `Norway (django.contrib.localflavor.no)`_
.. _Peru: `Peru (django.contrib.localflavor.pe)`_
.. _Poland: `Poland (django.contrib.localflavor.pl)`_
+.. _Romania: `Romania (django.contrib.localflavor.ro)`_
.. _Slovakia: `Slovakia (django.contrib.localflavor.sk)`_
.. _South Africa: `South Africa (django.contrib.localflavor.za)`_
.. _Spain: `Spain (django.contrib.localflavor.es)`_
.. _Switzerland: `Switzerland (django.contrib.localflavor.ch)`_
.. _United Kingdom: `United Kingdom (django.contrib.localflavor.uk)`_
.. _United States of America: `United States of America (django.contrib.localflavor.us)`_
-.. _newforms: ../newforms/
+.. _forms: ../forms/
Adding flavors
==============
@@ -151,6 +155,24 @@ AUStateSelect
A ``Select`` widget that uses a list of Australian states/territories as its
choices.
+Austria (``django.contrib.localflavor.at``)
+=============================================
+
+ATZipCodeField
+---------------
+
+A form field that validates its input as an Austrian zip code.
+
+ATStateSelect
+-------------
+
+A ``Select`` widget that uses a list of Austrian states as its choices.
+
+ATSocialSecurityNumberField
+---------------------------
+
+A form field that validates its input as an Austrian social security number.
+
Brazil (``django.contrib.localflavor.br``)
==========================================
@@ -497,6 +519,52 @@ PLVoivodeshipSelect
A ``Select`` widget that uses a list of Polish voivodeships (administrative
provinces) as its choices.
+Romania (``django.contrib.localflavor.ro``)
+============================================
+
+ROCIFField
+----------
+
+A form field that validates Romanian fiscal identification codes (CIF). The
+return value strips the leading RO, if given.
+
+ROCNPField
+----------
+
+A form field that validates Romanian personal numeric codes (CNP).
+
+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.
+
+ROCountySelect
+--------------
+
+A ``Select`` widget that uses a list of Romanian counties (judete) as its
+choices.
+
+ROIBANField
+-----------
+
+A form field that validates its input as a Romanian International Bank
+Account Number (IBAN). The valid format is ROXX-XXXX-XXXX-XXXX-XXXX-XXXX,
+with or without hyphens.
+
+ROPhoneNumberField
+------------------
+
+A form field that validates Romanian phone numbers, short special numbers
+excluded.
+
+ROPostalCodeField
+-----------------
+
+A form field that validates Romanian postal codes.
+
Slovakia (``django.contrib.localflavor.sk``)
============================================