diff --git a/pandora/settings.py b/pandora/settings.py index b90840544..a9703ead1 100644 --- a/pandora/settings.py +++ b/pandora/settings.py @@ -42,7 +42,6 @@ APPEND_SLASH = False # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = normpath(join(PROJECT_ROOT, '..', 'data')) STATIC_ROOT = normpath(join(PROJECT_ROOT, '..', 'static')) -TESTS_ROOT = join(PROJECT_ROOT, 'tests') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). diff --git a/pandora/urls.py b/pandora/urls.py index cd2105895..6bb4da04a 100644 --- a/pandora/urls.py +++ b/pandora/urls.py @@ -30,15 +30,14 @@ urlpatterns = patterns('', (r'^robots.txt$', serve_static_file, {'location': os.path.join(settings.STATIC_ROOT, 'robots.txt'), 'content_type': 'text/plain'}), (r'^favicon.ico$', serve_static_file, {'location': os.path.join(settings.STATIC_ROOT, 'png/icon.16.png'), 'content_type': 'image/x-icon'}), ) -if settings.DEBUG: - urlpatterns += patterns('', - (r'^data/(?P.*)$', 'django.views.static.serve', - {'document_root': settings.MEDIA_ROOT}), - (r'^static/(?P.*)$', 'django.views.static.serve', - {'document_root': settings.STATIC_ROOT}), - (r'^tests/(?P.*)$', 'django.views.static.serve', - {'document_root': settings.TESTS_ROOT}), - ) +#if settings.DEBUG: +#sould this not be enabled by default? nginx should handle those +urlpatterns += patterns('', + (r'^data/(?P.*)$', 'django.views.static.serve', + {'document_root': settings.MEDIA_ROOT}), + (r'^static/(?P.*)$', 'django.views.static.serve', + {'document_root': settings.STATIC_ROOT}), +) urlpatterns += patterns('', (r'^(V[a-z0-9]*)$', 'urlalias.views.padma_video'),