diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-05-17 13:36:39 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-17 13:21:28 +0200 |
commit | 1d64876a853295d00da80182ceecc31e513a303e (patch) | |
tree | d8396304cc1114066287c036b2394c7daad8ee49 /archaeological_operations/models.py | |
parent | 18454afd55026828338179f59699cf017ee01d9f (diff) | |
download | Ishtar-1d64876a853295d00da80182ceecc31e513a303e.tar.bz2 Ishtar-1d64876a853295d00da80182ceecc31e513a303e.zip |
Statistics - operation and site settings
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index d18b76f80..6b2cf4ec3 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -117,6 +117,16 @@ class ArchaeologicalSite(DocumentItem, BaseHistorizedItem, QRCodeItem, TABLE_COLS = ['reference', 'name', 'towns_label', 'periods', 'remains'] LONG_SLUG = 'archaeologicalsite' + STATISTIC_MODALITIES_OPTIONS = OrderedDict([ + ("towns__areas__label", _("Area")), + ("towns__areas__parent__label", _("Extended area")), + ("periods__label", _("Periods")), + ("remains__label", _("Remains")), + ("documents__source_type__label", _("Associated document type")), + ]) + STATISTIC_MODALITIES = [ + key for key, lbl in STATISTIC_MODALITIES_OPTIONS.items()] + BASE_SEARCH_VECTORS = [ SearchVectorConfig("comment", 'local'), SearchVectorConfig("discovery_area", 'local'), @@ -529,13 +539,20 @@ class Operation(ClosedItem, DocumentItem, BaseHistorizedItem, QRCodeItem, 'operation_type', 'start_date', 'excavation_end_date', 'remains'] # 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")), + ("towns__areas__label", _("Area")), + ("towns__areas__parent__label", _("Extended area")), + ("remains__label", _("Remains")), + ("periods__label", _("Periods")), + ("record_quality_type__label", _("Record quality")), + ("documentation_received", _("Documentation received")), + ("finds_received", _("Finds received")), + ("documents__source_type__label", _("Associated document type")), ]) + STATISTIC_MODALITIES = [ + key for key, lbl in STATISTIC_MODALITIES_OPTIONS.items()] # search parameters BOOL_FIELDS = ['end_date__isnull', 'virtual_operation', |