From b8bc3f6a387956dd412f986632a6c0dcdd9afd72 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Wed, 29 Dec 2010 17:46:09 -0500 Subject: Cleaning up config file --- greenbox/settings.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/greenbox/settings.py b/greenbox/settings.py index a496391..1a2b91d 100644 --- a/greenbox/settings.py +++ b/greenbox/settings.py @@ -1,8 +1,12 @@ +import os.path + SITE_ID = 1 USE_I18N = False DEBUG = True TEMPLATE_DEBUG = DEBUG +PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) + ADMINS = ( ('Mike Crute', 'mcrute@gmail.com'), ) @@ -10,8 +14,8 @@ ADMINS = ( MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' -DATABASE_NAME = '/srv/greenbox/greenbox.db' -#DATABASE_NAME = '/Users/mcrute/sandboxes/greenbox/src/greenbox.db' +#DATABASE_NAME = '/srv/greenbox/greenbox.db' +DATABASE_NAME = '/Users/mcrute/sandboxes/greenbox/src/greenbox.db' TIME_ZONE = 'America/New_York' LANGUAGE_CODE = 'en-us' @@ -19,17 +23,17 @@ ROOT_URLCONF = 'greenbox.urls' # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '' +MEDIA_ROOT = os.path.join(PROJECT_DIR, 'templates/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). # Examples: "http://media.lawrence.com", "http://example.com/media/" -MEDIA_URL = '' +MEDIA_URL = '/media' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/media/' +ADMIN_MEDIA_PREFIX = MEDIA_URL + 'admin/' SECRET_KEY = 'zki4e4!80ar7^1w6f_c2u^5#=r(7#4%0u^3il^@__#3zf^u+f)' @@ -45,7 +49,7 @@ MIDDLEWARE_CLASSES = ( ) TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". + os.path.join(PROJECT_DIR, 'templates'), ) INSTALLED_APPS = ( -- cgit v1.2.3