Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Added MEDIA_ROOT and MEDIA_URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm committed Sep 30, 2011
1 parent a55a189 commit 1803ad6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,5 +2,6 @@
collected-assets/*
ccui/settings/local.py
coverage/*
media/*
.livereload
*.pyc
4 changes: 4 additions & 0 deletions ccui/settings/base.py
Expand Up @@ -46,6 +46,10 @@
# Example: "http://media.lawrence.com/static/"
STATIC_URL = "/static/"

MEDIA_ROOT = join(BASE_PATH, "media")

MEDIA_URL = "/media/"

# A list of locations of additional static files
STATICFILES_DIRS = [join(BASE_PATH, "static")]

Expand Down
6 changes: 5 additions & 1 deletion ccui/urls.py
Expand Up @@ -34,4 +34,8 @@
if settings.DEBUG:
urlpatterns += patterns(
"",
url("^debug/", include("ccui.debug.urls")))
url("^debug/", include("ccui.debug.urls")),
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
}),
)
Empty file added media/.keep
Empty file.

0 comments on commit 1803ad6

Please sign in to comment.