diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-04-17 00:40:11 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-04-17 00:40:11 +0000 |
| commit | 968a0627d94ea425eda4d053871fcfe8aef14f26 (patch) | |
| tree | b687948ce2e194e7d0e36428bb94f11348f625a8 | |
| parent | 3b55c34704d7ec98a85bee348d515fff740e11b9 (diff) | |
Fixed #4058 -- Fixed AttributeError in databrowse with USE_I18N=True
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/databrowse/datastructures.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/contrib/databrowse/datastructures.py b/django/contrib/databrowse/datastructures.py index 3c509a2830..346a1e95e0 100644 --- a/django/contrib/databrowse/datastructures.py +++ b/django/contrib/databrowse/datastructures.py @@ -3,7 +3,6 @@ These classes are light wrappers around Django's database API that provide 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 @@ class EasyInstanceField(object): 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, self.field.name) |
