Commit 3e956da2 authored by fred's avatar fred
Browse files

handle /media/ URLs

parent cdd72568
......@@ -60,7 +60,7 @@ MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = ''
MEDIA_URL = '/media/'
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
......
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.views.generic import RedirectView
from django.core.urlresolvers import reverse_lazy
......@@ -21,6 +23,9 @@ urlpatterns = patterns('',
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns += staticfiles_urlpatterns()
from django.conf.urls.static import static
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
try:
from local_urls import *
except ImportError, e:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment