ojuso-map/apps/map/urls.py

42 lines
1.4 KiB
Python
Raw Permalink Normal View History

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
from django.views.i18n import JavaScriptCatalog
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"),
# 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"),
# 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",
),
]