Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Backwards-incompatible change -- Renamed localflavor.usa to localflav…

…or.us to match naming of other flavors.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4954 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1245b5c01ed4e9716ceda1e14e1167a70093a3b5 1 parent c7f6cd0
@freakboy3742 freakboy3742 authored
View
0  django/contrib/localflavor/usa/__init__.py → django/contrib/localflavor/us/__init__.py
File renamed without changes
View
0  django/contrib/localflavor/usa/forms.py → django/contrib/localflavor/us/forms.py
File renamed without changes
View
0  django/contrib/localflavor/usa/us_states.py → django/contrib/localflavor/us/us_states.py
File renamed without changes
View
2  django/db/models/fields/__init__.py
@@ -761,7 +761,7 @@ def validate(self, field_data, all_data):
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
10 tests/regressiontests/forms/localflavor.py
@@ -6,7 +6,7 @@
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 @@
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 @@
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 @@
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 @@
</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'
Please sign in to comment.
Something went wrong with that request. Please try again.