diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-26 20:07:49 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-26 20:07:49 +0200 |
commit | 54b86803f7a9e2c1013669d72212238cd74debe7 (patch) | |
tree | 811c188df7e29a2f7cc0f622aec9cc86713549df /archaeological_files/models.py | |
parent | c07a65eab011f364f2cf24e49787b152385979c9 (diff) | |
download | Ishtar-54b86803f7a9e2c1013669d72212238cd74debe7.tar.bz2 Ishtar-54b86803f7a9e2c1013669d72212238cd74debe7.zip |
Shorten the label of files in operation list (refs #408)
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r-- | archaeological_files/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index a6900ec08..7b7a7d9b5 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -143,6 +143,10 @@ class File(BaseHistorizedItem, OwnPerms): return self.cached_label @property + def short_label(self): + return settings.JOINT.join(unicode(self).split(settings.JOINT)[1:]) + + @property def reference(self): return u"-".join((unicode(self.year), unicode(self.numeric_reference or '0'))) |