diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-05-17 17:49:02 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-17 13:21:28 +0200 |
commit | 304dfe331142cea1c426942b8db7f6fc3541b7a5 (patch) | |
tree | b34dffb4ef5cef2f44eaeedce44c852110063fdf | |
parent | a4a1c1c1480b2159860309b1991a22eb83b33dee (diff) | |
download | Ishtar-304dfe331142cea1c426942b8db7f6fc3541b7a5.tar.bz2 Ishtar-304dfe331142cea1c426942b8db7f6fc3541b7a5.zip |
Statistics: file settings
-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'] |