Updated relative project path constant, applied it to media

This commit is contained in:
Correl Roush 2011-03-09 22:07:55 -05:00
parent c5aac25028
commit 1916576d0d

View file

@ -1,6 +1,6 @@
# Django settings for codereview project.
import os.path
PWD = os.path.dirname(os.path.realpath(__file__ ))
PROJECT_PATH = os.path.dirname(os.path.realpath(__file__ ))
DEBUG = False
TEMPLATE_DEBUG = DEBUG
@ -47,7 +47,7 @@ USE_L10N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
# 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).
@ -95,7 +95,7 @@ TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(PWD, 'templates')
os.path.join(PROJECT_PATH, 'templates')
)
INSTALLED_APPS = (