Skip to content
Snippets Groups Projects
Commit 2b11768e authored by Johannes Raggam's avatar Johannes Raggam
Browse files

use django/static in debug mode

parent 9e957da8
No related branches found
No related tags found
No related merge requests found
from django.conf import settings
from django.conf.urls.defaults import *
from django.views.generic.list_detail import object_detail, object_list
......@@ -33,3 +34,10 @@ urlpatterns = patterns('',
url(r'^(?P<object_id>\d+)/?$', object_detail, timeslots_dict, name='timeslot-detail'),
url(r'^week/?$', week_schedule),
)
if settings.DEBUG:
import os
PROGRAM_STATIC_DIR = os.path.join(os.path.dirname(__file__), '../site_media')
urlpatterns += patterns('',
url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': PROGRAM_STATIC_DIR}),
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment