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
This commit is contained in:
Adrian Holovaty 2007-02-15 05:53:44 +00:00
parent b93614ada6
commit 27b28616b4
5 changed files with 10 additions and 1 deletions

View File

View File

@ -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 File

@ -3225,7 +3225,7 @@ True
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'