Ticket #6238: databrowse.diff
File databrowse.diff, 724 bytes (added by , 17 years ago) |
---|
-
django/contrib/databrowse/datastructures.py
12 12 from django.db.models.query import QuerySet 13 13 14 14 EMPTY_VALUE = '(None)' 15 STRING_SIZE_LIMIT = 100 15 16 16 17 class EasyModel(object): 17 18 def __init__(self, site, model): … … 93 94 94 95 def __unicode__(self): 95 96 val = smart_unicode(self.instance) 96 if len(val) > 30:97 return val[: 30] + u'...'97 if len(val) > STRING_SIZE_LIMIT: 98 return val[:STRING_SIZE_LIMIT] + u'...' 98 99 return val 99 100 100 101 def __str__(self):