diff options
Diffstat (limited to 'todolists/urls.py')
-rw-r--r-- | todolists/urls.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/todolists/urls.py b/todolists/urls.py index 187d4820..8814d65e 100644 --- a/todolists/urls.py +++ b/todolists/urls.py @@ -1,4 +1,7 @@ from django.conf.urls.defaults import patterns +from django.contrib.auth.decorators import permission_required + +from .views import DeleteTodolist urlpatterns = patterns('todolists.views', (r'^$', 'list'), @@ -6,8 +9,8 @@ urlpatterns = patterns('todolists.views', (r'^add/$', 'add'), (r'^edit/(?P<list_id>\d+)/$', 'edit'), (r'^flag/(\d+)/(\d+)/$', 'flag'), - (r'^delete/(?P<object_id>\d+)/$', - 'delete_todolist'), + (r'^delete/(?P<pk>\d+)/$', + permission_required('main.delete_todolist')(DeleteTodolist.as_view())), ) # vim: set ts=4 sw=4 et: |