From 1916576d0d85618cbef8b6c2e41823182e501952 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Wed, 9 Mar 2011 22:07:55 -0500 Subject: [PATCH] Updated relative project path constant, applied it to media --- settings_default.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/settings_default.py b/settings_default.py index eedf49f..0c54c2d 100755 --- a/settings_default.py +++ b/settings_default.py @@ -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 = (