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
This commit is contained in:
Jannis Leidel 2011-04-22 12:02:38 +00:00
parent 6c17190bf8
commit 8b588747ed
8 changed files with 441 additions and 11 deletions

View file

@ -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``)
==============