-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
27 lines (22 loc) · 832 Bytes
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
url(r'^', include('cms.urls')),
)
urlpatterns += staticfiles_urlpatterns()
if settings.DEBUG:
urlpatterns += patterns('',
url(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
}),
)
#if settings.DEBUG:
# urlpatterns = patterns('',
# url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
# {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
# url(r'', include('django.contrib.staticfiles.urls')),
# ) + urlpatterns