1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #8210 and #8664: moved USStateField and PhoneNumberField to django.contrib.localflavor.us. This is a backwards-incompatible change, albeit a minor one; just add an aditional import and go on your way.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss
2008-09-01 22:15:35 +00:00
parent 4f225d44ce
commit 3a18002bbd
14 changed files with 53 additions and 48 deletions

View File

@@ -741,16 +741,6 @@ class NullBooleanField(Field):
defaults.update(kwargs)
return super(NullBooleanField, self).formfield(**defaults)
class PhoneNumberField(Field):
def get_internal_type(self):
return "PhoneNumberField"
def formfield(self, **kwargs):
from django.contrib.localflavor.us.forms import USPhoneNumberField
defaults = {'form_class': USPhoneNumberField}
defaults.update(kwargs)
return super(PhoneNumberField, self).formfield(**defaults)
class PositiveIntegerField(IntegerField):
def get_internal_type(self):
return "PositiveIntegerField"
@@ -876,16 +866,6 @@ class URLField(CharField):
defaults.update(kwargs)
return super(URLField, self).formfield(**defaults)
class USStateField(Field):
def get_internal_type(self):
return "USStateField"
def formfield(self, **kwargs):
from django.contrib.localflavor.us.forms import USStateSelect
defaults = {'widget': USStateSelect}
defaults.update(kwargs)
return super(USStateField, self).formfield(**defaults)
class XMLField(TextField):
def __init__(self, verbose_name=None, name=None, schema_path=None, **kwargs):
self.schema_path = schema_path