From 8b588747ed302fcdef0b79171ed3cf129cd32a38 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 22 Apr 2011 12:02:38 +0000 Subject: Fixed #12379 -- Added Chinese (cn) localflavor package. Thanks, Xia Kai, Daniel Duan, DaNmarner and Ɓukasz Rekucki. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://code.djangoproject.com/svn/django/trunk@16070 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/contrib/localflavor.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'docs') 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``) ============== -- cgit v1.3