2019-08-19 22:51:44 +00:00
|
|
|
from django.urls import path
|
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 . import views
|
|
|
|
|
|
|
|
urlpatterns = [
|
2019-08-19 22:51:44 +00:00
|
|
|
path("", RedirectView.as_view(url=reverse_lazy("map")), name="index"),
|
|
|
|
path("map", views.Map.as_view(), name="map"),
|
|
|
|
path("case-study/create", views.CreateCaseStudySelector.as_view(), name="create"),
|
|
|
|
path(
|
|
|
|
"case-study/create/short",
|
2019-08-19 21:37:32 +00:00
|
|
|
views.CreateShortCaseStudy.as_view(),
|
|
|
|
name="short-form",
|
|
|
|
),
|
2019-08-19 22:51:44 +00:00
|
|
|
path(
|
|
|
|
"case-study/create/long", views.CreateLongCaseStudy.as_view(), name="long-form"
|
2019-08-19 21:37:32 +00:00
|
|
|
),
|
2019-08-19 22:51:44 +00:00
|
|
|
path(
|
|
|
|
"case-study/create/poi",
|
2019-08-19 21:37:32 +00:00
|
|
|
views.CreatePointOfInterest.as_view(),
|
|
|
|
name="point-of-interest-form",
|
|
|
|
),
|
2019-08-19 22:51:44 +00:00
|
|
|
path(
|
|
|
|
"case-study/create/success",
|
2019-08-19 21:37:32 +00:00
|
|
|
views.CreateCaseStudySuccess.as_view(),
|
|
|
|
name="form-success",
|
|
|
|
),
|
2019-08-19 22:51:44 +00:00
|
|
|
path("case-study/edit/<int:pk>", views.EditCaseStudy.as_view(), name="edit"),
|
|
|
|
path("case-study/draft", views.DraftsAPI.as_view(), name="drafts"),
|
2019-04-07 17:40:00 +00:00
|
|
|
# This should be last so that the above options will be tried first!
|
2019-08-19 22:51:44 +00:00
|
|
|
path("case-study/<slug:slug>", views.ViewCaseStudyDetail.as_view(), name="detail"),
|
2018-04-16 04:27:13 +00:00
|
|
|
# API
|
2019-08-19 22:51:44 +00:00
|
|
|
path("jsi18n", JavaScriptCatalog.as_view(), name="javascript-catalogue"),
|
|
|
|
path(
|
|
|
|
"srs-autocomplete",
|
2019-08-19 21:37:32 +00:00
|
|
|
views.SpatialRefSysAutocomplete.as_view(),
|
|
|
|
name="srs-autocomplete",
|
|
|
|
),
|
2017-05-20 23:47:14 +00:00
|
|
|
]
|