summaryrefslogtreecommitdiff
path: root/archaeological_finds
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
commite8622c5d615bb39097cb4065976f53f2949976ae (patch)
tree51f9389ebd5b92cf477c169e9266201a8d90cbce /archaeological_finds
parent9b6160b263f737271a0f1aad44b02bca0a70b878 (diff)
downloadIshtar-e8622c5d615bb39097cb4065976f53f2949976ae.tar.bz2
Ishtar-e8622c5d615bb39097cb4065976f53f2949976ae.zip
Force own filters for context records and finds
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/urls.py6
-rw-r--r--archaeological_finds/wizards.py6
2 files changed, 12 insertions, 0 deletions
diff --git a/archaeological_finds/urls.py b/archaeological_finds/urls.py
index 29f502e15..7a01f952b 100644
--- a/archaeological_finds/urls.py
+++ b/archaeological_finds/urls.py
@@ -62,10 +62,16 @@ urlpatterns += patterns(
name='autocomplete-preservationtype'),
url(r'autocomplete-integritytype/$', 'autocomplete_integritytype',
name='autocomplete-integritytype'),
+ url(r'get-find/own/(?P<type>.+)?$', 'get_find',
+ name='get-own-find', kwargs={'force_own': True}),
url(r'get-find/(?P<type>.+)?$', 'get_find',
name='get-find'),
+ url(r'get-find-for-ope/own/(?P<type>.+)?$', 'get_find_for_ope',
+ name='get-own-find-for-ope', kwargs={'force_own': True}),
url(r'get-find-for-ope/(?P<type>.+)?$', 'get_find_for_ope',
name='get-find-for-ope'),
+ url(r'get-find-full/own/(?P<type>.+)?$', 'get_find',
+ name='get-own-find-full', kwargs={'full': True, 'force_own': True}),
url(r'get-find-full/(?P<type>.+)?$', 'get_find',
name='get-find-full', kwargs={'full': True}),
url(r'get-findsource/(?P<type>.+)?$',
diff --git a/archaeological_finds/wizards.py b/archaeological_finds/wizards.py
index 0a7ddc284..c586cd809 100644
--- a/archaeological_finds/wizards.py
+++ b/archaeological_finds/wizards.py
@@ -71,19 +71,25 @@ class FindWizard(Wizard):
dct['base_finds__context_record'] = dct.pop('pk')
return dct
+
class FindModificationWizard(FindWizard):
modification = True
+ filter_owns = {'selec-find_modification': ['pk']}
+
class TreatmentWizard(Wizard):
model = models.Treatment
+
class FindSourceWizard(SourceWizard):
model = models.FindSource
+
class FindSourceDeletionWizard(DeletionWizard):
model = models.FindSource
fields = ['item', 'title', 'source_type', 'authors',]
+
class TreatmentSourceWizard(SourceWizard):
model = models.TreatmentSource