2013-09-13 21:04:59 +02:00
|
|
|
from django.conf.urls import patterns, url
|
2013-10-14 19:46:53 +02:00
|
|
|
from django.contrib.auth.decorators import permission_required
|
2013-09-13 21:04:59 +02:00
|
|
|
|
2013-10-14 19:46:53 +02:00
|
|
|
from eventplanner.views import events_grid, eventplanning,event_api,EventUpdate,EventCreate,deleteEvent
|
2013-09-13 21:04:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = patterns('',
|
2013-10-14 19:46:53 +02:00
|
|
|
url(r'^$', eventplanning ),
|
2014-04-19 20:36:01 +02:00
|
|
|
url(r'^grid$', events_grid ),
|
2013-09-13 21:04:59 +02:00
|
|
|
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() ) ),
|
2014-04-19 20:36:01 +02:00
|
|
|
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" ),
|
2013-09-13 21:04:59 +02:00
|
|
|
)
|
|
|
|
|