diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-01-19 23:51:25 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-01-19 23:51:25 +0100 |
commit | 2e09fdb4314308387a8fd6f60e5633677767d3c6 (patch) | |
tree | 5309c4c39bdcec87b8b6aaa72cdf58d77e4021e0 | |
parent | 8a2fb2cb21fbc7c12990e6fd2ccd7494e8609fd4 (diff) | |
download | Ishtar-2e09fdb4314308387a8fd6f60e5633677767d3c6.tar.bz2 Ishtar-2e09fdb4314308387a8fd6f60e5633677767d3c6.zip |
More appropriate length for shortcuts (closes #105)
-rw-r--r-- | ishtar/furnitures/models.py | 12 |
1 files changed, 6 insertions, 6 deletions
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): |