diff options
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r-- | archaeological_files/models.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 30393c80c..c4bdb68f5 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -18,6 +18,7 @@ # See the file COPYING for details. import datetime +from collections import OrderedDict from django.conf import settings from django.contrib.gis.db import models @@ -88,6 +89,25 @@ class File(ClosedItem, DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter, SHOW_URL = 'show-file' TABLE_COLS = ['numeric_reference', 'year', 'internal_reference', 'file_type', 'saisine_type', 'towns_label', ] + # statistics + STATISTIC_MODALITIES_OPTIONS = OrderedDict([ + ('year', _("Year")), + ("file_type__label", _("File type")), + ("towns__areas__label", _("Area")), + ("towns__areas__parent__label", _("Extended area")), + ("saisine_type__label", "Type de saisine"), + ("permit_type__label", _("Permit type")), + ("requested_operation_type__label", _("File type")), + ]) + STATISTIC_MODALITIES = [ + key for key, lbl in STATISTIC_MODALITIES_OPTIONS.items()] + STATISTIC_SUM_VARIABLE = OrderedDict( + ( + ("pk", _("Number")), + ("total_surface", _(u"Total surface (m2)")), + ("total_developed_surface", _(u"Total developed surface (m2)")), + ) + ) # search parameters BOOL_FIELDS = ['end_date__isnull'] |