19 lines
927 B
Python
19 lines
927 B
Python
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 ),
|
|
url(r'^(?P<pk>\d+)$', permission_required('eventmanager.events.edit')( EventUpdate.as_view() ) ),
|
|
url(r'^add$', permission_required('eventmanager.events.edit')( EventCreate.as_view() ) ),
|
|
url(r'^(?P<pk>\d+)/delete$', permission_required('eventmanager.events.edit')( 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"),
|
|
)
|
|
|