Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Created django.contrib.localflavor, for country- and culture-specific…

… functionality. Moved django/newforms/extras/usa.py into there

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4524 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 27b28616b405578d81fb8e6a4efdc73459c81a2b 1 parent b93614a
@adrianholovaty adrianholovaty authored
View
0  django/contrib/localflavor/__init__.py
No changes.
View
0  django/contrib/localflavor/usa/__init__.py
No changes.
View
0  django/newforms/extras/usa.py → django/contrib/localflavor/usa/forms.py
File renamed without changes
View
9 docs/add_ons.txt
@@ -139,6 +139,15 @@ See the `flatpages documentation`_.
.. _flatpages documentation: ../flatpages/
+localflavor
+===========
+
+**New in Django development version**
+
+A collection of various Django snippets that are useful only for a particular
+country or culture. For example, ``django.contrib.localflavor.usa.forms``
+contains a ``USZipCodeField`` that you can use to validate U.S. zip codes.
+
markup
======
View
2  tests/regressiontests/forms/tests.py
@@ -3225,7 +3225,7 @@
USZipCodeField validates that the data is either a five-digit U.S. zip code or
a zip+4.
->>> from django.newforms.extras.usa import USZipCodeField
+>>> from django.contrib.localflavor.usa.forms import USZipCodeField
>>> f = USZipCodeField()
>>> f.clean('60606')
u'60606'
Please sign in to comment.
Something went wrong with that request. Please try again.