From 40b2449ed159f3b0c358653b133136d7093efe0b Mon Sep 17 00:00:00 2001 From: etienne Date: Tue, 9 Dec 2008 14:57:10 +0000 Subject: Base path configuration --- settings.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/settings.py b/settings.py index 52b37ec..c179ec7 100644 --- a/settings.py +++ b/settings.py @@ -6,6 +6,7 @@ DEBUG = True TEMPLATE_DEBUG = DEBUG +ROOT_PATH = '/var/local/django/papillon/' BASE_SITE = 'http://localhost:8000/papillon' # time to live in days DAYS_TO_LIVE = 30 @@ -17,7 +18,7 @@ ADMINS = ( MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. -DATABASE_NAME = 'papillon.db' # Or path to database file if using sqlite3. +DATABASE_NAME = ROOT_PATH + 'papillon.db' # Or path to database file if using sqlite3. DATABASE_USER = '' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. @@ -43,16 +44,16 @@ USE_I18N = True # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '' +MEDIA_ROOT = ROOT_PATH + 'media/' # URL that handles the media served from MEDIA_ROOT. # Example: "http://media.lawrence.com" -MEDIA_URL = '' +MEDIA_URL = BASE_SITE # 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 = BASE_SITE + '/media/' # Make this unique, and don't share it with anybody. SECRET_KEY = 'replace_this_with_something_else' @@ -78,7 +79,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. - '/var/local/django/papillon/templates', + ROOT_PATH + 'templates', ) INSTALLED_APPS = ( -- cgit v1.2.3