diff options
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r-- | archaeological_finds/models_finds.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 1b492148a..68bc5269c 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -192,6 +192,7 @@ class BaseFind(BaseHistorizedItem, OwnPerms): help_text=_(u"Cached value - do not edit")) history = HistoricalRecords() RELATED_POST_PROCESS = ['find'] + CACHED_LABELS = ['cache_short_id', 'cache_complete_id'] class Meta: verbose_name = _(u"Base find") @@ -254,6 +255,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms): ).format(self.index)) return settings.JOINT.join(c_id) + def _generate_cache_complete_id(self): + return self.complete_id() + def short_id(self): # OPE|FIND_index c_id = [self._ope_code()] @@ -261,6 +265,9 @@ class BaseFind(BaseHistorizedItem, OwnPerms): ).format(self.index)) return settings.JOINT.join(c_id) + def _generate_cache_short_id(self): + return self.short_id() + def full_label(self): return self._real_label() or self._temp_label() or u"" |