]> git.ozlabs.org Git - patchwork/blob - apps/patchwork/urls.py
bundles: Remove separate public bundle views
[patchwork] / apps / patchwork / urls.py
1 # Patchwork - automated patch tracking system
2 # Copyright (C) 2008 Jeremy Kerr <jk@ozlabs.org>
3 #
4 # This file is part of the Patchwork package.
5 #
6 # Patchwork is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # Patchwork is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with Patchwork; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
20 from django.conf.urls.defaults import *
21 from django.conf import settings
22 from django.contrib.auth import views as auth_views
23
24 urlpatterns = patterns('',
25     # Example:
26     (r'^$', 'patchwork.views.projects'),
27     (r'^project/(?P<project_id>[^/]+)/list/$', 'patchwork.views.patch.list'),
28     (r'^project/(?P<project_id>[^/]+)/$', 'patchwork.views.project.project'),
29
30     # patch views
31     (r'^patch/(?P<patch_id>\d+)/$', 'patchwork.views.patch.patch'),
32     (r'^patch/(?P<patch_id>\d+)/raw/$', 'patchwork.views.patch.content'),
33     (r'^patch/(?P<patch_id>\d+)/mbox/$', 'patchwork.views.patch.mbox'),
34
35     # logged-in user stuff
36     (r'^user/$', 'patchwork.views.user.profile'),
37     (r'^user/todo/$', 'patchwork.views.user.todo_lists'),
38     (r'^user/todo/(?P<project_id>[^/]+)/$', 'patchwork.views.user.todo_list'),
39
40     (r'^user/bundles/$',
41         'patchwork.views.bundle.bundles'),
42
43     (r'^user/link/$', 'patchwork.views.user.link'),
44     (r'^user/unlink/(?P<person_id>[^/]+)/$', 'patchwork.views.user.unlink'),
45
46     # password change
47     url(r'^user/password-change/$', auth_views.password_change,
48             name='auth_password_change'),
49     url(r'^user/password-change/done/$', auth_views.password_change_done,
50             name='auth_password_change_done'),
51
52     # login/logout
53     url(r'^user/login/$', auth_views.login,
54         {'template_name': 'patchwork/login.html'},
55         name = 'auth_login'),
56     url(r'^user/logout/$', auth_views.logout,
57         {'template_name': 'patchwork/logout.html'},
58         name = 'auth_logout'),
59
60     # registration
61     (r'^register/', 'patchwork.views.user.register'),
62
63     # public view for bundles
64     (r'^bundle/(?P<username>[^/]*)/(?P<bundlename>[^/]*)/$',
65                                 'patchwork.views.bundle.bundle'),
66     (r'^bundle/(?P<username>[^/]*)/(?P<bundlename>[^/]*)/mbox/$',
67                                 'patchwork.views.bundle.mbox'),
68
69     (r'^confirm/(?P<key>[0-9a-f]+)/$', 'patchwork.views.confirm'),
70
71     # submitter autocomplete
72     (r'^submitter/$', 'patchwork.views.submitter_complete'),
73
74     # email setup
75     (r'^mail/$', 'patchwork.views.mail.settings'),
76     (r'^mail/optout/$', 'patchwork.views.mail.optout'),
77     (r'^mail/optin/$', 'patchwork.views.mail.optin'),
78
79     # help!
80     (r'^help/(?P<path>.*)$', 'patchwork.views.help'),
81 )
82
83 if settings.ENABLE_XMLRPC:
84     urlpatterns += patterns('',
85         (r'xmlrpc/$', 'patchwork.views.xmlrpc.xmlrpc'),
86         (r'^pwclient/$', 'patchwork.views.pwclient'),
87         (r'^project/(?P<project_id>[^/]+)/pwclientrc/$',
88              'patchwork.views.pwclientrc'),
89     )
90
91 # redirect from old urls
92 if settings.COMPAT_REDIR:
93     urlpatterns += patterns('',
94         (r'^user/bundle/(?P<bundle_id>[^/]+)/$',
95             'patchwork.views.bundle.bundle_redir'),
96         (r'^user/bundle/(?P<bundle_id>[^/]+)/mbox/$',
97             'patchwork.views.bundle.mbox_redir'),
98     )
99