зеркало из https://github.com/mozilla/spark-eol.git
24 строки
689 B
Python
24 строки
689 B
Python
|
from django.conf import settings
|
||
|
from django.conf.urls.defaults import *
|
||
|
|
||
|
from django.contrib import admin
|
||
|
admin.autodiscover()
|
||
|
|
||
|
urlpatterns = patterns('',
|
||
|
(r'', include('commons.urls')),
|
||
|
(r'^', include('eol.urls')),
|
||
|
)
|
||
|
|
||
|
# Handle 404 and 500 errors
|
||
|
handler404 = 'commons.views.handle404'
|
||
|
handler500 = 'commons.views.handle500'
|
||
|
|
||
|
## In DEBUG mode, serve media files through Django.
|
||
|
if settings.DEBUG:
|
||
|
# Remove leading and trailing slashes so the regex matches.
|
||
|
media_url = settings.MEDIA_URL.lstrip('/').rstrip('/')
|
||
|
urlpatterns += patterns('',
|
||
|
(r'^%s/(?P<path>.*)$' % media_url, 'django.views.static.serve',
|
||
|
{'document_root': settings.MEDIA_ROOT}),
|
||
|
)
|