summaryrefslogtreecommitdiff
path: root/archaeological_operations/views.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-02-04 00:52:07 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-02-04 00:52:07 +0100
commit969eda7b6d5d8eafffab1279a223f9172f403837 (patch)
tree70048ed62d8f8aec7e68867dc595a628c3d6c075 /archaeological_operations/views.py
parentdee287f34dab74c184273f936b08b53d54d24893 (diff)
parentb0a48f170a51b7239960aadcc501e23b9af339c2 (diff)
downloadIshtar-969eda7b6d5d8eafffab1279a223f9172f403837.tar.bz2
Ishtar-969eda7b6d5d8eafffab1279a223f9172f403837.zip
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_operations/views.py')
-rw-r--r--archaeological_operations/views.py78
1 files changed, 47 insertions, 31 deletions
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py
index 9482f44b4..5299b7131 100644
--- a/archaeological_operations/views.py
+++ b/archaeological_operations/views.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2015 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2010-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -132,26 +132,30 @@ get_operation = get_item(
bool_fields=['end_date__isnull', 'virtual_operation'],
dated_fields=['start_date__lte', 'start_date__gte',
'excavation_end_date__lte', 'excavation_end_date__gte'],
- extra_request_keys={'common_name': 'common_name__icontains',
- 'abstract': 'abstract__icontains',
- 'end_date': 'end_date__isnull',
- 'year_index': ('year', 'operation_code'),
- 'start_before': 'start_date__lte',
- 'start_after': 'start_date__gte',
- 'end_before': 'excavation_end_date__lte',
- 'end_after': 'excavation_end_date__gte',
- 'towns__numero_insee__startswith':
- 'towns__numero_insee__startswith',
- 'parcel_0': ('parcels__section',
- 'associated_file__parcels__section'),
- 'parcel_1': (
- 'parcels__parcel_number',
- 'associated_file__parcels__parcel_number'),
- 'history_creator':
- 'history_creator__ishtaruser__person__pk',
- 'archaeological_sites':
- 'archaeological_sites__pk',
- },
+ extra_request_keys={
+ 'common_name': 'common_name__icontains',
+ 'comment': 'comment__icontains',
+ 'abstract': 'abstract__icontains',
+ 'end_date': 'end_date__isnull',
+ 'year_index': ('year', 'operation_code'),
+ 'start_before': 'start_date__lte',
+ 'start_after': 'start_date__gte',
+ 'end_before': 'excavation_end_date__lte',
+ 'end_after': 'excavation_end_date__gte',
+ 'towns__numero_insee__startswith':
+ 'towns__numero_insee__startswith',
+ 'parcel_0': ('parcels__section',
+ 'associated_file__parcels__section'),
+ 'parcel_1': (
+ 'parcels__parcel_number',
+ 'associated_file__parcels__parcel_number'),
+ 'history_creator':
+ 'history_creator__ishtaruser__person__pk',
+ 'history_modifier':
+ 'history_modifier__ishtaruser__person__pk',
+ 'archaeological_sites':
+ 'archaeological_sites__pk',
+ },
)
show_operation = show_item(models.Operation, 'operation')
revert_operation = revert_item(models.Operation)
@@ -167,22 +171,34 @@ get_operationsource = get_item(
'comment': 'comment__icontains',
'additional_information': 'additional_information__icontains',
'operation__towns': 'operation__towns__pk',
+ 'operation__code_patriarche': 'operation__code_patriarche',
'operation__operation_type': 'operation__operation_type__pk',
'operation__year': 'operation__year'})
get_administrativeactop = get_item(
models.AdministrativeAct,
'get_administrativeactop', 'administrativeactop',
- extra_request_keys={'associated_file__towns': 'associated_file__towns__pk',
- 'operation__towns': 'operation__towns__pk',
- 'act_type__intented_to': 'act_type__intented_to',
- 'year': 'signature_date__year',
- 'act_object': 'act_object__icontains',
- 'history_creator':
- 'history_creator__ishtaruser__person__pk',
- 'operation__towns__numero_insee__startswith':
- 'operation__towns__numero_insee__startswith'
- },
+ extra_request_keys={
+ 'associated_file__towns': 'associated_file__towns__pk',
+ 'operation__towns': 'operation__towns__pk',
+ 'operation__code_patriarche': 'operation__code_patriarche',
+ 'act_type__intented_to': 'act_type__intented_to',
+ 'year': 'signature_date__year',
+ 'act_object': 'act_object__icontains',
+ 'history_creator':
+ 'history_creator__ishtaruser__person__pk',
+ 'history_modifier':
+ 'history_modifier__ishtaruser__person__pk',
+ 'operation__towns__numero_insee__startswith':
+ 'operation__towns__numero_insee__startswith',
+ 'indexed': 'index__isnull',
+ 'parcel_0': ('operation__parcels__section',
+ 'operation__associated_file__parcels__section'),
+ 'parcel_1': (
+ 'operation__parcels__parcel_number',
+ 'operation__associated_file__parcels__parcel_number'),
+ },
+ reversed_bool_fields=['index__isnull'],
relative_session_names={'operation': 'operation__pk'})
get_administrativeact = get_item(