mirror of https://github.com/django/django.git
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:
parent
76f3856039
commit
36a748787d
|
@ -12,6 +12,7 @@ from django.utils.safestring import mark_safe
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
|
|
||||||
EMPTY_VALUE = '(None)'
|
EMPTY_VALUE = '(None)'
|
||||||
|
DISPLAY_SIZE = 100
|
||||||
|
|
||||||
class EasyModel(object):
|
class EasyModel(object):
|
||||||
def __init__(self, site, model):
|
def __init__(self, site, model):
|
||||||
|
@ -93,8 +94,8 @@ class EasyInstance(object):
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
val = smart_unicode(self.instance)
|
val = smart_unicode(self.instance)
|
||||||
if len(val) > 30:
|
if len(val) > DISPLAY_SIZE:
|
||||||
return val[:30] + u'...'
|
return val[:DISPLAY_SIZE] + u'...'
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
Loading…
Reference in New Issue