diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-04-22 12:02:38 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-04-22 12:02:38 +0000 |
| commit | 8b588747ed302fcdef0b79171ed3cf129cd32a38 (patch) | |
| tree | fbc885f1508079bdc643e5fb1a37750279bd26f1 /docs | |
| parent | 6c17190bf8c6c23f21dd49b029106dd5cb41ae2e (diff) | |
Fixed #12379 -- Added Chinese (cn) localflavor package. Thanks, Xia Kai, Daniel Duan, DaNmarner and Łukasz Rekucki.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16070 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/localflavor.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/ref/contrib/localflavor.txt b/docs/ref/contrib/localflavor.txt index e2515e3e08..9214458c3b 100644 --- a/docs/ref/contrib/localflavor.txt +++ b/docs/ref/contrib/localflavor.txt @@ -43,6 +43,7 @@ Countries currently supported by :mod:`~django.contrib.localflavor` are: * Brazil_ * Canada_ * Chile_ + * China_ * Czech_ * Finland_ * France_ @@ -92,6 +93,7 @@ Here's an example of how to use them:: .. _Brazil: `Brazil (br)`_ .. _Canada: `Canada (ca)`_ .. _Chile: `Chile (cl)`_ +.. _China: `China (cn)`_ .. _Czech: `Czech (cz)`_ .. _Finland: `Finland (fi)`_ .. _France: `France (fr)`_ @@ -337,6 +339,35 @@ Chile (``cl``) A ``Select`` widget that uses a list of Chilean regions (Regiones) as its choices. +China (``cn``) +============== + +.. 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. + Czech (``cz``) ============== |
