summaryrefslogtreecommitdiff
path: root/django/newforms
diff options
context:
space:
mode:
authorBrian Rosner <brosner@gmail.com>2008-06-16 20:36:34 +0000
committerBrian Rosner <brosner@gmail.com>2008-06-16 20:36:34 +0000
commita253ec3743a434077e339f6d1abb347b8e219e26 (patch)
tree4af25bbdad771b9cf2ca84bc97181a76a6bb95fa /django/newforms
parentd0af06bad873de63bc44933e0a9bd29d3809910d (diff)
newforms-admin: Merged from trunk up to [7668].
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/newforms')
-rw-r--r--django/newforms/fields.py1
-rw-r--r--django/newforms/models.py8
2 files changed, 1 insertions, 8 deletions
diff --git a/django/newforms/fields.py b/django/newforms/fields.py
index 08e8b842ec..dfe46a2e3e 100644
--- a/django/newforms/fields.py
+++ b/django/newforms/fields.py
@@ -514,7 +514,6 @@ class URLField(RegexField):
return value
if self.verify_exists:
import urllib2
- from django.conf import settings
headers = {
"Accept": "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5",
"Accept-Language": "en-us,en;q=0.5",
diff --git a/django/newforms/models.py b/django/newforms/models.py
index a60c1793a7..e515071162 100644
--- a/django/newforms/models.py
+++ b/django/newforms/models.py
@@ -544,13 +544,7 @@ class ModelChoiceField(ChoiceField):
# the queryset.
return ModelChoiceIterator(self)
- def _set_choices(self, value):
- # This method is copied from ChoiceField._set_choices(). It's necessary
- # because property() doesn't allow a subclass to overwrite only
- # _get_choices without implementing _set_choices.
- self._choices = self.widget.choices = list(value)
-
- choices = property(_get_choices, _set_choices)
+ choices = property(_get_choices, ChoiceField._set_choices)
def clean(self, value):
Field.clean(self, value)