summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-05-20 11:02:19 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-06-17 13:21:28 +0200
commitade613552c8b3ad46615659de5b44b633c7c8baa (patch)
treea1756dc61235345c3c6a95a5add52c160f2500a1
parentf10df0f9746189dfd372c45fc5fb7df34e799284 (diff)
downloadIshtar-ade613552c8b3ad46615659de5b44b633c7c8baa.tar.bz2
Ishtar-ade613552c8b3ad46615659de5b44b633c7c8baa.zip
Statistics: context records settings
-rw-r--r--archaeological_context_records/models.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 128342b57..3b5e24602 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -17,6 +17,8 @@
# See the file COPYING for details.
+from collections import OrderedDict
+
from django.conf import settings
from django.contrib.gis.db import models
from django.core.urlresolvers import reverse
@@ -304,6 +306,17 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem,
'related_context_records': 'detailled_related_context_records'
}
}
+ # statistics
+ STATISTIC_MODALITIES_OPTIONS = OrderedDict([
+ ("unit__label", _("Context record type")),
+ ("datings__period__label", _("Period")),
+ ("identification__label", _("Identification")),
+ ("activity__label", _("Activity")),
+ ("excavation_technic__label", _("Excavation technique")),
+ ("documents__source_type__label", _("Associated document type")),
+ ])
+ STATISTIC_MODALITIES = [
+ key for key, lbl in STATISTIC_MODALITIES_OPTIONS.items()]
# search parameters
EXTRA_REQUEST_KEYS = {