From fe78f0db71ac7a9528925492c8521496dc6c36ed Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 16 Aug 2018 12:38:41 +0200 Subject: Manage ope prefixes with the profile --- ishtar_common/models.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 8bab21360..bd800181f 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1210,7 +1210,6 @@ class FullSearch(models.Model): [data]) row = cursor.fetchone() search_vectors.append(row[0]) - # self.search_vector = merge_tsvectors(search_vectors) new_search_vector = merge_tsvectors(search_vectors) changed = old_search != new_search_vector if save and changed: @@ -1720,6 +1719,18 @@ class IshtarSiteProfile(models.Model, Cached): help_text=_(u"Homepage of Ishtar - if not defined a default homepage " u"will appear. Use the markdown syntax. {random_image} " u"can be used to display a random image.")) + operation_prefix = models.CharField( + _(u"Main operation code prefix"), default=u'OA', null=True, blank=True, + max_length=20 + ) + default_operation_prefix = models.CharField( + _(u"Default operation code prefix"), default=u'OP', null=True, + blank=True, max_length=20 + ) + operation_region_code = models.CharField( + _(u"Operation region code"), null=True, blank=True, + max_length=5 + ) file_external_id = models.TextField( _(u"File external id"), default=u"{year}-{numeric_reference}", -- cgit v1.2.3