summaryrefslogtreecommitdiff
path: root/todolists/urls.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:22:44 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:22:44 -0400
commit03fa7e4f27bdb39a8f8f5ed91a87d18bf8357b47 (patch)
treec67eafcbda55706f18400b3115a2b8a5be318394 /todolists/urls.py
parent91c451821ce7000cbc268cec8427d208a6cedd7e (diff)
parentb8ee7b1ee281b45b245fb454228b8ad847c56200 (diff)
Merge branch 'archweb' into archweb-generic2
Conflicts: devel/views.py feeds.py public/views.py settings.py sitestatic/archweb.js templates/base.html templates/devel/profile.html templates/mirrors/status.html templates/news/view.html templates/packages/flaghelp.html templates/packages/opensearch.xml templates/public/download.html templates/public/feeds.html templates/public/index.html templates/registration/login.html templates/releng/results.html templates/todolists/public_list.html
Diffstat (limited to 'todolists/urls.py')
-rw-r--r--todolists/urls.py29
1 files changed, 19 insertions, 10 deletions
diff --git a/todolists/urls.py b/todolists/urls.py
index a379468f..6617d7dd 100644
--- a/todolists/urls.py
+++ b/todolists/urls.py
@@ -1,17 +1,26 @@
from django.conf.urls import patterns
from django.contrib.auth.decorators import permission_required
-from .views import DeleteTodolist
+from .views import (view_redirect, view, todolist_list, add, edit, flag,
+ list_pkgbases, DeleteTodolist)
-urlpatterns = patterns('todolists.views',
- (r'^$', 'todolist_list'),
- (r'^(?P<list_id>\d+)/$', 'view'),
- (r'^(?P<list_id>\d+)/pkgbases/(?P<svn_root>[a-z]+)/$', 'list_pkgbases'),
- (r'^add/$', 'add'),
- (r'^edit/(?P<list_id>\d+)/$', 'edit'),
- (r'^flag/(\d+)/(\d+)/$', 'flag'),
- (r'^delete/(?P<pk>\d+)/$',
- permission_required('main.delete_todolist')(DeleteTodolist.as_view())),
+urlpatterns = patterns('',
+ (r'^$', todolist_list),
+
+ # old todolists URLs, permanent redirect view so we don't break all links
+ (r'^(?P<old_id>\d+)/$', view_redirect),
+
+ (r'^add/$',
+ permission_required('todolists.add_todolist')(add)),
+ (r'^(?P<slug>[-\w]+)/$', view),
+ (r'^(?P<slug>[-\w]+)/edit/$',
+ permission_required('todolists.change_todolist')(edit)),
+ (r'^(?P<slug>[-\w]+)/delete/$',
+ permission_required('todolists.delete_todolist')(DeleteTodolist.as_view())),
+ (r'^(?P<slug>[-\w]+)/flag/(?P<pkg_id>\d+)/$',
+ permission_required('todolists.change_todolistpackage')(flag)),
+ (r'^(?P<slug>[-\w]+)/pkgbases/(?P<svn_root>[a-z]+)/$',
+ list_pkgbases),
)
# vim: set ts=4 sw=4 et: