blechreiz-website/eventplanner/urls.py

19 lines
927 B
Python
Raw Normal View History

from django.conf.urls import patterns, url
from django.contrib.auth.decorators import permission_required
from eventplanner.views import events_grid, eventplanning,event_api,EventUpdate,EventCreate,deleteEvent
urlpatterns = patterns('',
url(r'^$', eventplanning ),
url(r'^grid$', events_grid ),
url(r'^planning$', eventplanning ),
2013-10-15 21:51:05 +02:00
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"),
)