Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
152 lines (122 sloc) 3.6 KB
import os
PASTA = os.path.dirname(__file__)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Gladson', 'gladsonbrito@gmail.com'),
)
MANAGERS = ADMINS
## Pull in CloudFoundry's production settings
if 'VCAP_SERVICES' in os.environ:
import json
vcap_services = json.loads(os.environ['VCAP_SERVICES'])
# XXX: avoid hardcoding here
mysql_srv = vcap_services['mysql-5.1'][0]
cred = mysql_srv['credentials']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': cred['name'],
'USER': cred['user'],
'PASSWORD': cred['password'],
'HOST': cred['hostname'],
'PORT': cred['port'],
}
}
else:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "dev.db",
"USER": "",
"PASSWORD": "",
"HOST": "",
"PORT": "",
}
}
TIME_ZONE = 'America/Porto_Velho'
LANGUAGE_CODE = 'pt-BR'
SITE_ID = 1
USE_I18N = True
USE_L10N = True
USE_TZ = True
MEDIA_ROOT = os.path.join(PASTA, 'media')
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.join(PASTA, 'static')
STATIC_URL = '/static/'
#ADMIN_MEDIA_PREFIX = '/static/admin/'
STATICFILES_DIRS = (
os.path.join(PASTA, 'sitestatic'),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
SECRET_KEY = '0tc6gk^8x=lfzyh0&%1u^7tu0wb(aho7o6+6!*yr!=#c#b4c$@'
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'urls'
WSGI_APPLICATION = 'wsgi.application'
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
TEMPLATE_DIRS = (
os.path.join(PROJECT_ROOT, "templates"),
)
DJANGO_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
)
ADD_APPS = (
'django.contrib.admin',
'auto_create_admin',
)
PROJETO_APPS = (
)
INSTALLED_APPS = DJANGO_APPS + ADD_APPS + PROJETO_APPS
# LOGGING = {
# 'version': 1,
# 'disable_existing_loggers': False,
# 'filters': {
# 'require_debug_false': {
# '()': 'django.utils.log.RequireDebugFalse'
# }
# },
# 'handlers': {
# 'mail_admins': {
# 'level': 'ERROR',
# 'filters': ['require_debug_false'],
# 'class': 'django.utils.log.AdminEmailHandler'
# }
# },
# 'loggers': {
# 'django.request': {
# 'handlers': ['mail_admins'],
# 'level': 'ERROR',
# 'propagate': True,
# },
# }
# }
Something went wrong with that request. Please try again.