aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Meyer <carl@dirtcircle.com>2009-12-13 08:37:35 -0500
committerCarl Meyer <carl@dirtcircle.com>2009-12-13 08:37:35 -0500
commit1f24ba8a1a916e4df41c514edaa729807acd7ce2 (patch)
tree3b4cd367729994353b2aab6696e7649188872b1d
parent8b1bb7b106f753c2b28284c4516cc1e9f27c2841 (diff)
downloadchishop-1f24ba8a1a916e4df41c514edaa729807acd7ce2.tar.bz2
chishop-1f24ba8a1a916e4df41c514edaa729807acd7ce2.tar.xz
chishop-1f24ba8a1a916e4df41c514edaa729807acd7ce2.zip
clean up MEDIA_URL: fixes #8, fixes #9
-rw-r--r--chishop/conf/default.py4
-rw-r--r--chishop/urls.py2
2 files changed, 2 insertions, 4 deletions
diff --git a/chishop/conf/default.py b/chishop/conf/default.py
index 606d9d1..97002b6 100644
--- a/chishop/conf/default.py
+++ b/chishop/conf/default.py
@@ -58,9 +58,7 @@ MEDIA_ROOT = os.path.join(here, 'media')
58# URL that handles the media served from MEDIA_ROOT. Make sure to use a 58# URL that handles the media served from MEDIA_ROOT. Make sure to use a
59# trailing slash if there is a path component (optional in other cases). 59# trailing slash if there is a path component (optional in other cases).
60# Examples: "http://media.lawrence.com", "http://example.com/media/" 60# Examples: "http://media.lawrence.com", "http://example.com/media/"
61MEDIA_URL = 'media/' 61MEDIA_URL = '/media/'
62
63MEDIA_PREFIX = "/media/"
64 62
65# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 63# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
66# trailing slash. 64# trailing slash.
diff --git a/chishop/urls.py b/chishop/urls.py
index ab2e8a9..5a5dd77 100644
--- a/chishop/urls.py
+++ b/chishop/urls.py
@@ -10,7 +10,7 @@ urlpatterns = patterns('')
10# Serve static pages. 10# Serve static pages.
11if settings.LOCAL_DEVELOPMENT: 11if settings.LOCAL_DEVELOPMENT:
12 urlpatterns += patterns("django.views", 12 urlpatterns += patterns("django.views",
13 url(r"%s(?P<path>.*)$" % settings.MEDIA_URL[1:], "static.serve", { 13 url(r"^%s(?P<path>.*)$" % settings.MEDIA_URL[1:], "static.serve", {
14 "document_root": settings.MEDIA_ROOT})) 14 "document_root": settings.MEDIA_ROOT}))
15 15
16urlpatterns += patterns("", 16urlpatterns += patterns("",