-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
21 lines (18 loc) · 790 Bytes
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^comic/random/', 'comics.views.random_comic'),
(r'^comic/(?P<comic_id>\d+)/', 'comics.views.comic'),
(r'^archive/', 'comics.views.archive'),
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^grappelli/', include('grappelli.urls')),
(r'^$', 'comics.views.index'),
)
if settings.LOCAL_MEDIA:
urlpatterns +=patterns('',
(r'^static/(.+)', 'django.views.static.serve', { 'document_root' : settings.STATIC_ROOT }),
(r'^media/(.+)', 'django.views.static.serve', { 'document_root' : settings.MEDIA_ROOT })
)