Find file
Fetching contributors…
Cannot retrieve contributors at this time
113 lines (91 sloc) 3.16 KB
# Django settings for project project.
import calloway
import os
import sys
CALLOWAY_ROOT = os.path.abspath(os.path.dirname(calloway.__file__))
sys.path.insert(0, os.path.join(CALLOWAY_ROOT, 'apps'))
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, 'apps'))
sys.path.insert(0, os.path.join(PROJECT_ROOT, 'lib'))
try:
from local_settings import DEBUG as LOCAL_DEBUG
DEBUG = LOCAL_DEBUG
except ImportError:
DEBUG = False
TEMPLATE_DEBUG = DEBUG
from calloway.settings import *
ADMINS = (
('jquick', 'j@j.com'),
)
MANAGERS = ADMINS
DEFAULT_FROM_EMAIL='j@j.com'
SERVER_EMAIL='j@j.com'
SECRET_KEY = 'hs(27a4zq_xwiuoj*c)7=w2c*ge)pkmbdhl9t^g4h@qow5g7tl'
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = os.path.join(PROJECT_ROOT, 'dev.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.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
TIME_ZONE = 'America/New_York'
LANGUAGE_CODE = 'en-us'
USE_I18N = True
try:
from local_settings import MEDIA_URL_PREFIX
except ImportError:
MEDIA_URL_PREFIX = "/media/"
try:
from local_settings import MEDIA_ROOT_PREFIX
except ImportError:
MEDIA_ROOT_PREFIX = os.path.join(PROJECT_ROOT, 'media')
try:
from local_settings import MEDIA_ROOT
except ImportError:
MEDIA_ROOT = os.path.join(MEDIA_ROOT_PREFIX, 'uploads')
try:
from local_settings import STATIC_ROOT
except ImportError:
STATIC_ROOT = os.path.join(MEDIA_ROOT_PREFIX, 'static')
MEDIA_URL = '%suploads/' % MEDIA_URL_PREFIX
STATIC_URL = "%sstatic/" % MEDIA_URL_PREFIX
STATIC_MEDIA_APP_MEDIA_PATH = STATIC_ROOT
STATIC_MEDIA_COPY_PATHS = (
{'from': os.path.join(CALLOWAY_ROOT, 'media'), 'to': STATIC_ROOT},
{'from': 'static', 'to': STATIC_ROOT},
)
STATIC_MEDIA_COMPRESS_CSS = not DEBUG
STATIC_MEDIA_COMPRESS_JS = not DEBUG
MMEDIA_DEFAULT_STORAGE = 'media_storage.MediaStorage'
MMEDIA_IMAGE_UPLOAD_TO = 'image/%Y/%m/%d'
AUTH_PROFILE_MODULE = ''
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(PROJECT_ROOT, 'templates'),
) + CALLOWAY_TEMPLATE_DIRS
CACHE_BACKEND = 'dummy:///'
INSTALLED_APPS = APPS_CORE + \
APPS_ADMIN + \
APPS_STAFF + \
APPS_REVERSION + \
APPS_STORIES + \
APPS_CALLOWAY_DEFAULT + \
APPS_CATEGORIES + \
APPS_FRONTEND_ADMIN + \
APPS_MEDIA + \
APPS_UTILS + \
APPS_REGISTRATION + \
APPS_TINYMCE + (
'django.contrib.webdesign',
'schedule',
)
ADMIN_TOOLS_THEMING_CSS = 'admin/css/theming.css'
# ADMIN_TOOLS_MENU = 'menu.CustomMenu'
TINYMCE_JS_URL = '%sjs/tiny_mce/tiny_mce.js' % STATIC_URL
TINYMCE_JS_ROOT = os.path.join(STATIC_ROOT, 'js/tiny_mce')
FORCE_SCRIPT_NAME = ''
try:
from local_settings import *
except ImportError:
pass