Browse files

Fixed #4058 -- Fixed AttributeError in databrowse with USE_I18N=True

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
adrianholovaty committed Apr 17, 2007
1 parent 3b55c34 commit 968a0627d94ea425eda4d053871fcfe8aef14f26
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/contrib/databrowse/
@@ -3,7 +3,6 @@
convenience functionality and permalink functions for the databrowse app.
-from django.contrib.admin.views.main import EMPTY_CHANGELIST_VALUE
from django.db import models
from django.utils import dateformat
from django.utils.text import capfirst
@@ -132,6 +131,10 @@ def values(self):
Returns a list of values for this field for this instance. It's a list
so we can accomodate many-to-many fields.
+ # This import is deliberately inside the function because it causes
+ # some settings to be imported, and we don't want to do that at the
+ # module level.
+ from django.contrib.admin.views.main import EMPTY_CHANGELIST_VALUE
if self.field.rel:
if isinstance(self.field.rel, models.ManyToOneRel):
objs = getattr(self.instance.instance,

0 comments on commit 968a062

Please sign in to comment.