videopdf/pdfvideo/urls.py
2013-02-12 12:39:52 +05:30

39 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
# GPL 2013
from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'pdfvideo.views.home', name='home'),
# url(r'^pdfvideo/', include('pdfvideo.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^data/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT}),
)
urlpatterns += patterns('item.views',
(r'^$', 'index'),
(r'^add$', 'add'),
(r'^([A-Z0-9].*)/$', 'item'),
(r'^([A-Z0-9].*)/chunk$', 'chunk'),
(r'^([A-Z0-9].*)/edit$', 'item', {'edit': True}),
(r'^([A-Z0-9].*)/(.+.pdf)$', 'pdf'),
(r'^([A-Z0-9].*)$', 'item'),
)