blechreiz-website/eventplanner/urls.py

16 lines
799 B
Python
Raw Permalink Normal View History

from django.conf.urls import url
from django.contrib.auth.decorators import permission_required
from eventplanner.views import events_grid, eventplanning, event_api, EventUpdate, EventCreate, deleteEvent
urlpatterns = [
url(r'^$', eventplanning),
url(r'^grid$', events_grid),
url(r'^planning$', eventplanning),
url(r'^(?P<pk>\d+)$', permission_required('eventplanner.change_event')(EventUpdate.as_view())),
url(r'^add$', permission_required('eventplanner.add_event')(EventCreate.as_view())),
url(r'^(?P<pk>\d+)/delete$', permission_required('eventplanner.delete_event')(deleteEvent)),
url(r'^api/', event_api, name="event_api"),
url(r'^api/(\w+)/$', event_api, name="event_api_per_user"),
url(r'^api/(\w+)/(\d+)$', event_api, name="event_api_per_user_event"),
]