diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-25 12:56:23 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-25 12:56:23 +0200 | 
| commit | a3f562c6050819aeee23bd10e3efa38126e7f0d7 (patch) | |
| tree | 13240b03be05b0ce63c261f80274d21dcda65111 /archaeological_files/models.py | |
| parent | 7be596f41305b4be26796625bd800d58a04bb0a7 (diff) | |
| download | Ishtar-a3f562c6050819aeee23bd10e3efa38126e7f0d7.tar.bz2 Ishtar-a3f562c6050819aeee23bd10e3efa38126e7f0d7.zip | |
Improve cached_label display
Diffstat (limited to 'archaeological_files/models.py')
| -rw-r--r-- | archaeological_files/models.py | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/archaeological_files/models.py b/archaeological_files/models.py index ec7069e62..30c060789 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -25,7 +25,7 @@ from django.db.models import Q, Count, Sum  from django.db.models.signals import post_save, m2m_changed  from django.utils.translation import ugettext_lazy as _, ugettext -from ishtar_common.utils import cached_label_changed, shortify +from ishtar_common.utils import cached_label_changed  from ishtar_common.models import GeneralType, BaseHistorizedItem, \      HistoricalRecords, OwnPerms, Person, Organization, Department, Town, \ @@ -103,8 +103,8 @@ class File(BaseHistorizedItem, OwnPerms):      postal_code = models.CharField(_(u"Main address - postal code"),                                     max_length=10, null=True, blank=True)      comment = models.TextField(_(u"Comment"), null=True, blank=True) -    cached_label = models.CharField(_(u"Cached name"), max_length=100, -                                   null=True, blank=True) +    cached_label = models.CharField(_(u"Cached name"), max_length=500, +                                    null=True, blank=True)      history = HistoricalRecords()      class Meta: @@ -144,7 +144,7 @@ class File(BaseHistorizedItem, OwnPerms):              items[0] = unicode(self.towns.all()[0])          items.append("-".join((unicode(self.year),                                 unicode(self.numeric_reference or '0')))) -        items += [shortify(unicode(getattr(self, k))) +        items += [unicode(getattr(self, k))                    for k in ['internal_reference', 'name'] if getattr(self, k)]          return settings.JOINT.join(items) | 
