summaryrefslogtreecommitdiff
path: root/archaeological_context_records
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-12-14 22:02:33 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-12-14 22:02:33 +0100
commit6c47b6b3bc23aadc674175f140091f46aa5f3868 (patch)
tree51f9389ebd5b92cf477c169e9266201a8d90cbce /archaeological_context_records
parent08811d24b0a1869322db82b65c4fbd8a35bc7327 (diff)
downloadIshtar-6c47b6b3bc23aadc674175f140091f46aa5f3868.tar.bz2
Ishtar-6c47b6b3bc23aadc674175f140091f46aa5f3868.zip
Force own filters for context records and finds
Diffstat (limited to 'archaeological_context_records')
-rw-r--r--archaeological_context_records/urls.py8
-rw-r--r--archaeological_context_records/wizards.py2
2 files changed, 10 insertions, 0 deletions
diff --git a/archaeological_context_records/urls.py b/archaeological_context_records/urls.py
index 7487c39c5..6ffc2f194 100644
--- a/archaeological_context_records/urls.py
+++ b/archaeological_context_records/urls.py
@@ -64,11 +64,19 @@ urlpatterns += patterns(
'show_contextrecord', name='show-historized-contextrecord'),
url(r'revert-contextrecord/(?P<pk>.+)/(?P<date>.+)$',
'revert_contextrecord', name='revert-contextrecord'),
+ url(r'get-contextrecord/own/(?P<type>.+)?$', 'get_contextrecord',
+ name='get-own-contextrecord', kwargs={'force_own': True}),
url(r'get-contextrecord/(?P<type>.+)?$', 'get_contextrecord',
name='get-contextrecord'),
+ url(r'get-contextrecord-for-ope/own/(?P<type>.+)?$',
+ 'get_contextrecord_for_ope',
+ name='get-own-contextrecord-for-ope', kwargs={'force_own': True}),
url(r'get-contextrecord-for-ope/(?P<type>.+)?$',
'get_contextrecord_for_ope',
name='get-contextrecord-for-ope'),
+ url(r'get-contextrecord-full/own/(?P<type>.+)?$',
+ 'get_contextrecord', name='get-own-contextrecord-full',
+ kwargs={'full': True, 'force_own': True}),
url(r'get-contextrecord-full/(?P<type>.+)?$',
'get_contextrecord', name='get-contextrecord-full',
kwargs={'full': True}),
diff --git a/archaeological_context_records/wizards.py b/archaeological_context_records/wizards.py
index a51809d32..99c666e89 100644
--- a/archaeological_context_records/wizards.py
+++ b/archaeological_context_records/wizards.py
@@ -94,6 +94,7 @@ class RecordWizard(Wizard):
class RecordModifWizard(RecordWizard):
modification = True
model = models.ContextRecord
+ filter_owns = {'selec-record_modification': ['pk']}
class RecordDeletionWizard(DeletionWizard):
@@ -102,6 +103,7 @@ class RecordDeletionWizard(DeletionWizard):
'depth', 'location', 'datings', 'units', 'has_furniture',
'filling', 'interpretation', 'taq', 'taq_estimated', 'tpq',
'tpq_estimated']
+ filter_owns = {'selec-record_deletion': ['pk']}
class RecordSourceWizard(SourceWizard):