aboutsummaryrefslogtreecommitdiff
blob: 2aa40d98eaefd6bd5808e96be3db9b2f4c8de97e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from django.conf.urls.defaults import *
from django.conf import settings

prefix = 'web.main.views.'

urlpatterns = patterns('',
    (r'^$', prefix+'index'),
    (r'^browse$', prefix+'browse'),
    (r'^browse/(?P<category_name>\w+-\w+)$', prefix+'browse'),
    (r'^browse/(?P<category_name>\w+(-\w+){0,1})/(?P<pkg_name>.*)$', prefix+'browse'),
    (r'^view/package/(?P<category_name>\w+(-\w*){0,1})/(?P<pkg_name>[a-zA-Z_-]+)-(?P<pkg_ver>[0-9_.r-]+)$', prefix+'view'),
    (r'^view/attachment/(?P<attachment_id>\d+)$', prefix+'view_attachment'),
    (r'^view/content/(?P<packageproperties_id>\d+)$', prefix+'view_content'),
    (r'^search/by-path/(?P<path>.*)$', prefix+'search_by_path'),
    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_DIR, 'show_indexes': True}),
)