urls.py 1.43 KB
Newer Older
Dan McGee's avatar
Dan McGee committed
1
from django.conf.urls import include, patterns
2
3
4

package_patterns = patterns('packages.views',
    (r'^$',            'details'),
5
    (r'^json/$',       'details_json'),
6
    (r'^files/$',      'files'),
7
    (r'^files/json/$', 'files_json'),
8
    (r'^flag/$',       'flag'),
9
    (r'^flag/done/$',  'flag_confirmed', {}, 'package-flag-confirmed'),
10
    (r'^unflag/$',     'unflag'),
Dan McGee's avatar
Dan McGee committed
11
    (r'^unflag/all/$', 'unflag_all'),
12
    (r'^signoff/$',    'signoff_package'),
Dan McGee's avatar
Dan McGee committed
13
    (r'^signoff/revoke/$', 'signoff_package', {'revoke': True}),
14
    (r'^signoff/options/$', 'signoff_options'),
15
16
    (r'^download/$',   'download'),
)
Dan McGee's avatar
Dan McGee committed
17
18
19

urlpatterns = patterns('packages.views',
    (r'^flaghelp/$', 'flaghelp'),
20
    (r'^signoffs/$', 'signoffs', {}, 'package-signoffs'),
Dan McGee's avatar
Dan McGee committed
21
    (r'^signoffs/json/$', 'signoffs_json', {}, 'package-signoffs-json'),
Dan McGee's avatar
Dan McGee committed
22
23
    (r'^update/$',   'update'),

Dan McGee's avatar
Dan McGee committed
24
    (r'^$',                      'search', {}, 'packages-search'),
Dan McGee's avatar
Dan McGee committed
25
26
    (r'^(?P<page>\d+)/$',        'search'),

Dan McGee's avatar
Dan McGee committed
27
    (r'^differences/$',          'arch_differences', {}, 'packages-differences'),
28
    (r'^stale_relations/$',      'stale_relations'),
29
    (r'^stale_relations/update/$','stale_relations_update'),
Dan McGee's avatar
Dan McGee committed
30

31
    (r'^(?P<name>[^ /]+)/$',
Dan McGee's avatar
Dan McGee committed
32
        'details'),
33
    (r'^(?P<repo>[A-z0-9\-]+)/(?P<name>[^ /]+)/$',
Dan McGee's avatar
Dan McGee committed
34
        'details'),
35
    # canonical package url. subviews defined above
36
    (r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[^ /]+)/',
37
        include(package_patterns)),
Dan McGee's avatar
Dan McGee committed
38
39
40
)

# vim: set ts=4 sw=4 et: