From 0122c68228b0cf3f1ec152481bcb7c22248248d3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 14 May 2019 16:12:21 +0200 Subject: Statistics - JS and templates to manage graphs and tables --- archaeological_operations/models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'archaeological_operations/models.py') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 4f180c3d5..d18b76f80 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -17,6 +17,7 @@ # See the file COPYING for details. +from collections import OrderedDict import datetime from itertools import groupby @@ -530,6 +531,11 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem, # statistics STATISTIC_MODALITIES = ["year", "operation_type__label", "towns__cached_label"] + STATISTIC_MODALITIES_OPTIONS = OrderedDict([ + ('year', _("Year")), + ("operation_type__label", _("Operation type")), + ("towns__cached_label", _("Towns")), + ]) # search parameters BOOL_FIELDS = ['end_date__isnull', 'virtual_operation', -- cgit v1.2.3