Update frontend and forms

This commit is contained in:
Livvy Mackintosh
2017-11-18 16:54:44 +00:00
parent aa6c1cf33b
commit 310be805c5
16 changed files with 712 additions and 128 deletions

View File

@ -1,15 +1,18 @@
from django.conf.urls import url
from django.urls import reverse_lazy
from django.views.generic import RedirectView
from djgeojson.views import GeoJSONLayerView
from .models import CaseStudy
from . import views
urlpatterns = [
url(r'^$', views.Map.as_view(), name='index'),
url(r'^$', RedirectView.as_view(url=reverse_lazy('map')), 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')
url(r'^case-study/(?P<slug>[-\w]+)/?$', views.CaseStudyDetail.as_view(), name='detail'),
url(r'^map/?$', views.Map.as_view(), name='map')
]