diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-12-15 18:15:55 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-12-15 18:15:55 +0000 |
| commit | 1c4ed6126baa8856056867b1db09b52066627fe8 (patch) | |
| tree | 2049111259a24ccd225815b740e965a424729439 | |
| parent | 1147a57d209f02efc98fef0e96b6cd683e5102ae (diff) | |
Moved newforms import out of Field.formfield()
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/models/fields/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 50afbc6f50..81ae8f093a 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -3,6 +3,7 @@ from django.dispatch import dispatcher from django.conf import settings from django.core import validators from django import oldforms +from django import newforms as forms from django.core.exceptions import ObjectDoesNotExist from django.utils.functional import curry from django.utils.itercompat import tee @@ -335,9 +336,8 @@ class Field(object): def formfield(self): "Returns a django.newforms.Field instance for this database Field." - from django.newforms import CharField # TODO: This is just a temporary default during development. - return CharField(label=capfirst(self.verbose_name)) + return forms.CharField(label=capfirst(self.verbose_name)) class AutoField(Field): empty_strings_allowed = False |
