2019-01-05 11:27:15 +01:00
|
|
|
from django.conf.urls import url
|
2013-10-14 19:46:53 +02:00
|
|
|
from django.contrib.auth.decorators import permission_required
|
2019-01-05 11:27:15 +01:00
|
|
|
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"),
|
|
|
|
]
|