From 1c4ed6126baa8856056867b1db09b52066627fe8 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 15 Dec 2006 18:15:55 +0000 Subject: [PATCH] Moved newforms import out of Field.formfield() git-svn-id: http://code.djangoproject.com/svn/django/trunk@4210 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/fields/__init__.py | 4 ++-- 1 file 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