1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Backwards-incompatible change -- Renamed localflavor.usa to localflavor.us to match naming of other flavors.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4954 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2007-04-08 11:21:00 +00:00
parent c7f6cd0243
commit 1245b5c01e
5 changed files with 6 additions and 6 deletions

View File

@ -761,7 +761,7 @@ class PhoneNumberField(IntegerField):
validators.isValidPhone(field_data, all_data)
def formfield(self, **kwargs):
from django.contrib.localflavor.usa.forms import USPhoneNumberField
from django.contrib.localflavor.us.forms import USPhoneNumberField
defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}
defaults.update(kwargs)
return USPhoneNumberField(**defaults)

View File

@ -6,7 +6,7 @@ localflavor_tests = r"""
USZipCodeField validates that the data is either a five-digit U.S. zip code or
a zip+4.
>>> from django.contrib.localflavor.usa.forms import USZipCodeField
>>> from django.contrib.localflavor.us.forms import USZipCodeField
>>> f = USZipCodeField()
>>> f.clean('60606')
u'60606'
@ -67,7 +67,7 @@ u''
USPhoneNumberField validates that the data is a valid U.S. phone number,
including the area code. It's normalized to XXX-XXX-XXXX format.
>>> from django.contrib.localflavor.usa.forms import USPhoneNumberField
>>> from django.contrib.localflavor.us.forms import USPhoneNumberField
>>> f = USPhoneNumberField()
>>> f.clean('312-555-1212')
u'312-555-1212'
@ -136,7 +136,7 @@ u''
USStateField validates that the data is either an abbreviation or name of a
U.S. state.
>>> from django.contrib.localflavor.usa.forms import USStateField
>>> from django.contrib.localflavor.us.forms import USStateField
>>> f = USStateField()
>>> f.clean('il')
u'IL'
@ -181,7 +181,7 @@ u''
USStateSelect is a Select widget that uses a list of U.S. states/territories
as its choices.
>>> from django.contrib.localflavor.usa.forms import USStateSelect
>>> from django.contrib.localflavor.us.forms import USStateSelect
>>> w = USStateSelect()
>>> print w.render('state', 'IL')
<select name="state">
@ -247,7 +247,7 @@ as its choices.
</select>
# USSocialSecurityNumberField #################################################
>>> from django.contrib.localflavor.usa.forms import USSocialSecurityNumberField
>>> from django.contrib.localflavor.us.forms import USSocialSecurityNumberField
>>> f = USSocialSecurityNumberField()
>>> f.clean('987-65-4330')
u'987-65-4330'