Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 968a0627d94ea425eda4d053871fcfe8aef14f26 1 parent 3b55c34
Adrian Holovaty authored April 17, 2007
5  django/contrib/databrowse/datastructures.py
@@ -3,7 +3,6 @@
3 3
 convenience functionality and permalink functions for the databrowse app.
4 4
 """
5 5
 
6  
-from django.contrib.admin.views.main import EMPTY_CHANGELIST_VALUE
7 6
 from django.db import models
8 7
 from django.utils import dateformat
9 8
 from django.utils.text import capfirst
@@ -132,6 +131,10 @@ def values(self):
132 131
         Returns a list of values for this field for this instance. It's a list
133 132
         so we can accomodate many-to-many fields.
134 133
         """
  134
+        # This import is deliberately inside the function because it causes
  135
+        # some settings to be imported, and we don't want to do that at the
  136
+        # module level.
  137
+        from django.contrib.admin.views.main import EMPTY_CHANGELIST_VALUE
135 138
         if self.field.rel:
136 139
             if isinstance(self.field.rel, models.ManyToOneRel):
137 140
                 objs = getattr(self.instance.instance, self.field.name)

0 notes on commit 968a062

Please sign in to comment.
Something went wrong with that request. Please try again.