summaryrefslogtreecommitdiff
path: root/archaeological_finds/urls.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-21 18:21:53 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-21 18:21:53 +0200
commit92cbc747a1c09ad8bdc0d472bdd9f6c9008a1c36 (patch)
treec116345a9984d2b81f39b1ce9a25b4060afaaa27 /archaeological_finds/urls.py
parent312353c3bc6650aa1c9f7a6cf25df74711d417ff (diff)
downloadIshtar-92cbc747a1c09ad8bdc0d472bdd9f6c9008a1c36.tar.bz2
Ishtar-92cbc747a1c09ad8bdc0d472bdd9f6c9008a1c36.zip
urls: remove pattern (not compatible with Django 1.11)
Diffstat (limited to 'archaeological_finds/urls.py')
-rw-r--r--archaeological_finds/urls.py99
1 files changed, 46 insertions, 53 deletions
diff --git a/archaeological_finds/urls.py b/archaeological_finds/urls.py
index 78ea05e96..317afcb91 100644
--- a/archaeological_finds/urls.py
+++ b/archaeological_finds/urls.py
@@ -17,18 +17,18 @@
# See the file COPYING for details.
-from django.conf.urls import patterns, url
+from django.conf.urls import url
from ishtar_common.wizards import check_rights
-import views
+from archaeological_finds import views
+from archaeological_operations.views import administrativeactfile_document
from archaeological_finds import models
# be careful: each check_rights must be relevant with ishtar_menu
# forms
-urlpatterns = patterns(
- '',
+urlpatterns = [
url(r'find_search/(?P<step>.+)?$',
check_rights(['view_find', 'view_own_find'])(
views.find_search_wizard), name='find_search'),
@@ -197,8 +197,6 @@ urlpatterns = patterns(
check_rights(['change_treatmentfile', 'change_own_treatmentfile'])(
views.treatmentfile_source_deletion_wizard),
name='treatmentfile_source_deletion'),
-
-
url(r'^treatmentfle_search/(?P<step>.+)?$',
check_rights(['change_find', 'change_own_find'])(
views.treatmentfile_search_wizard),
@@ -225,94 +223,89 @@ urlpatterns = patterns(
url(r'get-downstreamtreatment/(?P<type>.+)?$',
views.get_downstreamtreatment,
name='get-downstreamtreatment'),
-)
-
-urlpatterns += patterns(
- 'archaeological_finds.views',
- url(r'autocomplete-objecttype/$', 'autocomplete_objecttype',
+ url(r'autocomplete-objecttype/$', views.autocomplete_objecttype,
name='autocomplete-objecttype'),
- url(r'autocomplete-materialtype/$', 'autocomplete_materialtype',
+ url(r'autocomplete-materialtype/$', views.autocomplete_materialtype,
name='autocomplete-materialtype'),
- url(r'autocomplete-preservationtype/$', 'autocomplete_preservationtype',
+ url(r'autocomplete-preservationtype/$', views.autocomplete_preservationtype,
name='autocomplete-preservationtype'),
- url(r'autocomplete-integritytype/$', 'autocomplete_integritytype',
+ url(r'autocomplete-integritytype/$', views.autocomplete_integritytype,
name='autocomplete-integritytype'),
- url(r'autocomplete-treatmentfile/$', 'autocomplete_treatmentfile',
+ url(r'autocomplete-treatmentfile/$', views.autocomplete_treatmentfile,
name='autocomplete-treatmentfile'),
- url(r'get-find/own/(?P<type>.+)?$', 'get_find',
+ url(r'get-find/own/(?P<type>.+)?$', views.get_find,
name='get-own-find', kwargs={'force_own': True}),
- url(r'get-find/(?P<type>.+)?$', 'get_find',
+ url(r'get-find/(?P<type>.+)?$', views.get_find,
name='get-find'),
- url(r'get-find-for-ope/own/(?P<type>.+)?$', 'get_find_for_ope',
+ url(r'get-find-for-ope/own/(?P<type>.+)?$', views.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',
+ url(r'get-find-for-ope/(?P<type>.+)?$', views.get_find_for_ope,
name='get-find-for-ope'),
- url(r'get-find-for-treatment/own/(?P<type>.+)?$', 'get_find_for_treatment',
+ url(r'get-find-for-treatment/own/(?P<type>.+)?$',
+ views.get_find_for_treatment,
name='get-own-find-for-treatment', kwargs={'force_own': True}),
- url(r'get-find-for-treatment/(?P<type>.+)?$', 'get_find_for_treatment',
+ url(r'get-find-for-treatment/(?P<type>.+)?$', views.get_find_for_treatment,
name='get-find-for-treatment'),
- url(r'get-find-full/own/(?P<type>.+)?$', 'get_find',
+ url(r'get-find-full/own/(?P<type>.+)?$', views.get_find,
name='get-own-find-full', kwargs={'full': True, 'force_own': True}),
- url(r'get-find-full/(?P<type>.+)?$', 'get_find',
+ url(r'get-find-full/(?P<type>.+)?$', views.get_find,
name='get-find-full', kwargs={'full': True}),
url(r'get-find-shortcut/(?P<type>.+)?$',
- 'get_find', name='get-find-shortcut',
+ views.get_find, name='get-find-shortcut',
kwargs={'full': 'shortcut'}),
url(r'get-findsource/(?P<type>.+)?$',
- 'get_findsource', name='get-findsource'),
+ views.get_findsource, name='get-findsource'),
url(r'get-findsource-full/(?P<type>.+)?$',
- 'get_findsource', name='get-findsource-full',
+ views.get_findsource, name='get-findsource-full',
kwargs={'full': True}),
- url(r'^show-findsource(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_findsource',
+ url(r'^show-findsource(?:/(?P<pk>.+))?/(?P<type>.+)?$',
+ views.show_findsource,
name=models.FindSource.SHOW_URL),
- url(r'^show-find/basket-(?P<pk>.+)/(?P<type>.+)?$', 'show_findbasket',
+ url(r'^show-find/basket-(?P<pk>.+)/(?P<type>.+)?$', views.show_findbasket,
name='show-findbasket'),
- url(r'^display-find/basket-(?P<pk>.+)/$', 'display_findbasket',
+ url(r'^display-find/basket-(?P<pk>.+)/$', views.display_findbasket,
name='display-findbasket'),
- url(r'^show-find(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_find',
+ url(r'^show-find(?:/(?P<pk>.+))?/(?P<type>.+)?$', views.show_find,
name=models.Find.SHOW_URL),
- url(r'^display-find/(?P<pk>.+)/$', 'display_find',
+ url(r'^display-find/(?P<pk>.+)/$', views.display_find,
name='display-' + models.Find.SLUG),
url(r'^show-historized-find/(?P<pk>.+)?/(?P<date>.+)?$',
- 'show_find', name='show-historized-find'),
+ views.show_find, name='show-historized-find'),
url(r'^revert-find/(?P<pk>.+)/(?P<date>.+)$',
- 'revert_find', name='revert-find'),
+ views.revert_find, name='revert-find'),
url(r'^get-treatment/(?P<type>.+)?$',
- 'get_treatment', name='get-treatment'),
+ views.get_treatment, name='get-treatment'),
url(r'get-treatment-shortcut/(?P<type>.+)?$',
- 'get_treatment', name='get-treatment-shortcut',
+ views.get_treatment, name='get-treatment-shortcut',
kwargs={'full': 'shortcut'}),
- url(r'^show-treatment(?:/(?P<pk>.+))?/(?P<type>.+)?$', 'show_treatment',
+ url(r'^show-treatment(?:/(?P<pk>.+))?/(?P<type>.+)?$', views.show_treatment,
name=models.Treatment.SHOW_URL),
url(r'show-historized-treatment/(?P<pk>.+)?/(?P<date>.+)?$',
- 'show_treatment', name='show-historized-treatment'),
+ views.show_treatment, name='show-historized-treatment'),
url(r'^revert-treatment/(?P<pk>.+)/(?P<date>.+)$',
- 'revert_treatment', name='revert-treatment'),
+ views.revert_treatment, name='revert-treatment'),
url(r'get-treatmentfile/(?P<type>.+)?$',
- 'get_treatmentfile', name='get-treatmentfile'),
+ views.get_treatmentfile, name='get-treatmentfile'),
url(r'get-treatmentfile-shortcut/(?P<type>.+)?$',
- 'get_treatmentfile', name='get-treatmentfile-shortcut',
+ views.get_treatmentfile, name='get-treatmentfile-shortcut',
kwargs={'full': 'shortcut'}),
url(r'^show-treatmentfile(?:/(?P<pk>.+))?/(?P<type>.+)?$',
- 'show_treatmentfile',
+ views.show_treatmentfile,
name=models.TreatmentFile.SHOW_URL),
url(r'show-historized-treatmentfile/(?P<pk>.+)?/(?P<date>.+)?$',
- 'show_treatmentfile', name='show-historized-treatmentfile'),
+ views.show_treatmentfile, name='show-historized-treatmentfile'),
url(r'^revert-treatmentfile/(?P<pk>.+)/(?P<date>.+)$',
- 'revert_treatmentfile', name='revert-treatmentfile'),
- # url(r'show-treatmentfile(?:/(?P<pk>.+))?/(?P<type>.+)?$',
- # 'show_treatmentfile',
- # name=models.TreatmentFile.SHOW_URL),
-)
-
-urlpatterns += patterns(
- 'archaeological_operations.views',
+ views.revert_treatmentfile, name='revert-treatmentfile'),
url(r'^treatment_administrativeact_document/$',
- 'administrativeactfile_document',
+ administrativeactfile_document,
name='treatment-administrativeact-document',
kwargs={'treatment': True}),
url(r'^treatmentfle_administrativeact_document/$',
- 'administrativeactfile_document',
+ administrativeactfile_document,
name='treatmentfle-administrativeact-document',
kwargs={'treatment_file': True}),
-)
+]
+
+# url(r'show-treatmentfile(?:/(?P<pk>.+))?/(?P<type>.+)?$',
+# 'show_treatmentfile',
+# name=models.TreatmentFile.SHOW_URL),