From 7bdd9755308fbeac84688a4c5a32be50f0ccdb85 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 19 Jan 2011 23:51:25 +0100 Subject: More appropriate length for shortcuts (closes #105) --- ishtar/furnitures/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ishtar') diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py index bc299e132..3a93175b7 100644 --- a/ishtar/furnitures/models.py +++ b/ishtar/furnitures/models.py @@ -312,9 +312,10 @@ class File(BaseHistorizedItem, OwnPerms): items = [unicode(_('Intercommunal'))] if self.towns.count() == 1: items[0] = unicode(self.towns.all()[0]) - items += [unicode(getattr(self, k))[:12] for k in ['year', - 'numeric_reference', 'internal_reference',] - if getattr(self, k)] + items.append("-".join((unicode(self.year), + unicode(self.numeric_reference)))) + items += [unicode(getattr(self, k))[:36] + for k in ['internal_reference',] if getattr(self, k)] return u" - ".join(items) @classmethod @@ -366,9 +367,8 @@ class Operation(BaseHistorizedItem, OwnPerms): items = [unicode(_('Intercommunal'))] if self.towns.count() == 1: items[0] = unicode(self.towns.all()[0]) - items += [unicode(getattr(self, k))[:12] for k in ['year', - 'operation_code',] - if getattr(self, k)] + items.append("-".join((unicode(self.year), + unicode(self.operation_code)))) return u" - ".join(items) def is_own(self, person): -- cgit v1.2.3