e3399662b46bcf196c12a259173c8f4d0d071856
[redakcja.git] / project / urls.py
1 from django.conf.urls.defaults import *
2 from django.contrib import admin
3 from django.conf import settings
4
5
6 admin.autodiscover()
7
8
9 urlpatterns = patterns('',
10     # Example:
11     # (r'^platforma/', include('platforma.foo.urls')),
12
13     # Admin panel
14     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
15     url(r'^admin/(.*)', admin.site.root),
16 )
17
18
19 # Static files
20 if settings.DEBUG:
21     urlpatterns += patterns('',
22         url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve', 
23             {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
24         url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
25             {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
26     )