Permalink
Fetching contributors…
Cannot retrieve contributors at this time
195 lines (165 sloc) 4.9 KB
# Django settings for project project.
import os
import sys
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.join(PROJECT_ROOT, 'apps'))
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('coordt', 'coreyoordt@gmail.com'),
)
MANAGERS = ADMINS
DEFAULT_FROM_EMAIL = 'webmaster@callowayproject.com'
SERVER_EMAIL = 'webmaster@callowayproject.com'
SECRET_KEY = ''
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'dev.db',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
ALLOWED_HOSTS = [
'www.callowayproject.com',
'callowayproject.com',
]
SITE_ID = 1
ROOT_URLCONF = 'urls'
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(PROJECT_ROOT, 'staticmedia')
MEDIA_URL = '%suploads/' % MEDIA_URL_PREFIX
STATIC_URL = "%sstatic/" % MEDIA_URL_PREFIX
ADMIN_MEDIA_PREFIX = "%sadmin/" % STATIC_URL
STATICFILES_DIRS = (
os.path.join(PROJECT_ROOT, 'static'),
)
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'),
)
# CACHE_BACKEND = 'versionedcache.backend://localhost:11211/'
CACHE_BACKEND = 'dummy:///'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
INSTALLED_APPS = (
'suit',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django.contrib.flatpages',
'django.contrib.humanize',
'robots',
'djangopypi',
'projects',
'analytical',
'mystaff',
)
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.contrib.messages.context_processors.messages",
"django.core.context_processors.request",
)
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'wsgi.application'
GOOGLE_ANALYTICS_PROPERTY_ID = 'UA-8352901-3'
MIDDLEWARE_CLASSES = [
'djangopypi.middleware.ConsoleExceptionMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'urls'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
'datefmt': "%d/%b/%Y %H:%M:%S"
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'handlers': {
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': 'callowaysite.log',
'formatter': 'verbose'
},
},
'loggers': {
'djangopypi': {
'handlers': ['file'],
'level': 'DEBUG',
},
},
'root': {
'handlers': ['file'],
'level': 'DEBUG',
}
}
SUIT_CONFIG = {
# header
'ADMIN_NAME': 'Calloway Company Site',
'HEADER_DATE_FORMAT': 'l, F j Y',
'HEADER_TIME_FORMAT': 'h:i A',
# forms
# 'SHOW_REQUIRED_ASTERISK': True, # Default True
# 'CONFIRM_UNSAVED_CHANGES': True, # Default True
# menu
# 'SEARCH_URL': '/admin/auth/user/',
# 'MENU_ICONS': {
# 'sites': 'icon-leaf',
# 'auth': 'icon-lock',
# },
# 'MENU_OPEN_FIRST_CHILD': True, # Default True
# 'MENU_EXCLUDE': ('auth.group',),
# 'MENU': (
# 'sites',
# {'app': 'auth', 'icon':'icon-lock', 'models': ('user', 'group')},
# {'label': 'Settings', 'icon':'icon-cog', 'models': ('auth.user', 'auth.group')},
# {'label': 'Support', 'icon':'icon-question-sign', 'url': '/support/'},
# ),
# misc
# 'LIST_PER_PAGE': 15
}
try:
from local_settings import *
except ImportError:
pass