ojuso-map/apps/map/urls.py
2017-10-10 00:58:36 +01:00

16 lines
740 B
Python

from django.conf.urls import url
from djgeojson.views import GeoJSONLayerView
from .models import CaseStudy
from . import views
urlpatterns = [
url(r'^$', views.Map.as_view(), name='index'),
url(r'^data.geojson$', GeoJSONLayerView.as_view(model=CaseStudy, geometry_field='location'), name='data'),
url(r'^case-study/create/?$', views.Create.as_view(), name="create"),
url(r'^case-study/create/short/?$', views.ShortForm.as_view(), name='short-form'),
url(r'^case-study/create/long/?$', views.LongForm.as_view(), name='long-form'),
url(r'^case-study/create/success/?$', views.FormSuccess.as_view(), name='form-success'),
url(r'^case-study/(?P<slug>[-\w]+)/?$', views.CaseStudyDetail.as_view(), name='detail')
]