2017-05-20 23:47:14 +00:00
|
|
|
from django.conf.urls import url
|
2017-11-18 16:54:44 +00:00
|
|
|
from django.urls import reverse_lazy
|
|
|
|
from django.views.generic import RedirectView
|
2018-10-13 05:04:44 +00:00
|
|
|
from django.views.i18n import JavaScriptCatalog
|
2017-05-20 23:47:14 +00:00
|
|
|
from djgeojson.views import GeoJSONLayerView
|
|
|
|
|
|
|
|
from .models import CaseStudy
|
|
|
|
from . import views
|
|
|
|
|
|
|
|
urlpatterns = [
|
2017-11-18 16:54:44 +00:00
|
|
|
url(r'^$', RedirectView.as_view(url=reverse_lazy('map')), name='index'),
|
2019-03-04 19:57:47 +00:00
|
|
|
url(r'^case-study/create/?$', views.CreateCaseStudySelector.as_view(), name="create"),
|
|
|
|
url(r'^case-study/create/short/?$', views.CreateShortCaseStudy.as_view(), name='short-form'),
|
|
|
|
url(r'^case-study/create/long/?$', views.CreateLongCaseStudy.as_view(), name='long-form'),
|
|
|
|
url(r'^case-study/create/poi/?$', views.CreatePointOfInterest.as_view(), name='point-of-interest-form'),
|
|
|
|
url(r'^case-study/create/success/?$', views.CreateCaseStudySuccess.as_view(), name='form-success'),
|
2019-03-04 19:48:29 +00:00
|
|
|
url(r'^case-study/edit/(?P<pk>[\d]+)/?$', views.EditCaseStudy.as_view(), name='edit'),
|
2019-03-04 19:57:47 +00:00
|
|
|
|
|
|
|
# View case studies
|
|
|
|
url(r'^case-study/(?P<slug>[-\w]+)/?$', views.ViewCaseStudyDetail.as_view(), name='detail'),
|
2018-04-16 04:27:13 +00:00
|
|
|
url(r'^map/?$', views.Map.as_view(), name='map'),
|
|
|
|
|
|
|
|
# API
|
2019-03-04 19:57:47 +00:00
|
|
|
url(r'^case-study/draft/?$', views.DraftsAPI.as_view(), name='drafts'),
|
2018-10-13 05:04:44 +00:00
|
|
|
url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalogue'),
|
2018-04-16 04:27:13 +00:00
|
|
|
url(r'^srs-autocomplete/$', views.SpatialRefSysAutocomplete.as_view(), name='srs-autocomplete'),
|
2017-05-20 23:47:14 +00:00
|
|
|
]
|