Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
110 lines (90 sloc) 2.7 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 = (
('$$$$NAME$$$$', '$$$$EMAIL_ADDRESS$$$$'),
)
MANAGERS = ADMINS
DEFAULT_FROM_EMAIL='$$$$EMAIL_ADDRESS$$$$'
SERVER_EMAIL='$$$$EMAIL_ADDRESS$$$$'
SECRET_KEY = '$$$$SECRET_KEY$$$$'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'dev.db',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
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
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 = 'memcached://localhost:11211/'
INSTALLED_APPS = APPS_DJANGO_BASE + \
APPS_MESSAGES + \
APPS_ADMIN + \
APPS_STAFF + \
APPS_REVERSION + \
APPS_STORIES + \
APPS_CALLOWAY_DEFAULT + \
APPS_MPTT + \
APPS_CATEGORIES + \
APPS_COMMENT_UTILS + \
APPS_FRONTEND_ADMIN + \
APPS_MEDIA + \
APPS_UTILS + \
APPS_REGISTRATION + \
APPS_TINYMCE + (
'staticfiles',
'calloway',
)
ADMIN_TOOLS_THEMING_CSS = 'calloway/admin/css/theming.css'
# ADMIN_TOOLS_MENU = 'menu.CustomMenu'
TINYMCE_JS_URL = '%scalloway/js/tiny_mce/tiny_mce.js' % STATIC_URL
TINYMCE_JS_ROOT = os.path.join(STATIC_ROOT, 'js/tiny_mce')
try:
from local_settings import *
except ImportError:
pass