# HG changeset patch # User Steve Losh # Date 1239231258 14400 # Node ID 0b0276b6360b3080ae84b1f1b879c23858ae6f0f # Parent ed9aff132907616764074cdf9ee47986325ea0b6 Cleaned up the silly hardcoding of the BASE_DIR. diff -r ed9aff132907 -r 0b0276b6360b deploy-template.py --- a/deploy-template.py Fri Mar 27 18:28:41 2009 -0400 +++ b/deploy-template.py Wed Apr 08 18:54:18 2009 -0400 @@ -13,9 +13,6 @@ # start a new project. SECRET_KEY = '' -# Make sure it ends in a trailing slash! -BASE_DIR = '/full/path/to/project/directory/' - # This is used for the Mint (http://haveamint.com/) Bird Feeder plugin hack. FEEDER_PASSWORD = '' diff -r ed9aff132907 -r 0b0276b6360b settings.py --- a/settings.py Fri Mar 27 18:28:41 2009 -0400 +++ b/settings.py Wed Apr 08 18:54:18 2009 -0400 @@ -1,4 +1,5 @@ from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS +import os import deploy @@ -36,11 +37,11 @@ USE_I18N = True # Base directory. -BASE_DIR = deploy.BASE_DIR +BASE_DIR = os.path.dirname(__file__) # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = BASE_DIR + 'site-media/' +MEDIA_ROOT = os.path.join(BASE_DIR, 'site-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). @@ -74,7 +75,7 @@ ROOT_URLCONF = 'stevelosh.urls' TEMPLATE_DIRS = ( - BASE_DIR + 'templates/', + os.path.join(BASE_DIR, 'templates/'), ) TEMPLATE_CONTEXT_PROCESSORS += (