Fixed #6238 -- Bumped up the length of data displayed in databrowse slightly. Patch from Nick Efford.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6948 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-12-19 03:58:53 +00:00
parent 76f3856039
commit 36a748787d
1 changed files with 3 additions and 2 deletions

View File

@ -12,6 +12,7 @@ from django.utils.safestring import mark_safe
from django.db.models.query import QuerySet
EMPTY_VALUE = '(None)'
DISPLAY_SIZE = 100
class EasyModel(object):
def __init__(self, site, model):
@ -93,8 +94,8 @@ class EasyInstance(object):
def __unicode__(self):
val = smart_unicode(self.instance)
if len(val) > 30:
return val[:30] + u'...'
if len(val) > DISPLAY_SIZE:
return val[:DISPLAY_SIZE] + u'...'
return val
def __str__(self):