diff options
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) |