summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
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
commita09215dd1525576bb5f50a7dc7a51645a3697e42 (patch)
treea1756dc61235345c3c6a95a5add52c160f2500a1 /archaeological_context_records/models.py
parent304dfe331142cea1c426942b8db7f6fc3541b7a5 (diff)
downloadIshtar-a09215dd1525576bb5f50a7dc7a51645a3697e42.tar.bz2
Ishtar-a09215dd1525576bb5f50a7dc7a51645a3697e42.zip
Statistics: context records settings
Diffstat (limited to 'archaeological_context_records/models.py')
-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 = {