99 lines
2.4 KiB
Python
99 lines
2.4 KiB
Python
"""
|
|
Django settings for rowsandall_app project.
|
|
|
|
Generated by 'django-admin startproject' using Django 1.9.5.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/1.9/topics/settings/
|
|
|
|
For the full list of settings and their values, see
|
|
https://docs.djangoproject.com/en/1.9/ref/settings/
|
|
"""
|
|
from settings import *
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
|
'HOST': 'localhost',
|
|
},
|
|
# 'TEST': {
|
|
# 'CHARSET': 'utf8',
|
|
# 'COLLATION': 'utf8_general_ci',
|
|
# },
|
|
|
|
# 'slave': {
|
|
# 'ENGINE': 'django.db.backends.mysql',
|
|
# 'NAME': 'rowsanda_107501',
|
|
# 'USER': 'rowsanda_107501',
|
|
# 'PASSWORD': 'roeidata',
|
|
# 'HOST': 'store3.rosti.cz',
|
|
# 'PORT': '3306',
|
|
# }
|
|
}
|
|
|
|
BROKER_URL = 'redis://localhost:6379/0'
|
|
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
|
|
CELERY_IGNORE_RESULT = False
|
|
|
|
CELERY_ACCEPT_CONTENT = ['json']
|
|
CELERY_TASK_SERIALIZER = 'json'
|
|
CELERY_RESULT_SERIALIZER = 'json'
|
|
CELERY_TRACK_STARTED = True
|
|
CELERY_SEND_TASK_SENT_EVENT = True
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
DEBUG = True
|
|
|
|
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
|
|
|
|
ALLOWED_HOSTS = ['localhost']
|
|
|
|
INSTALLED_APPS += ['debug_toolbar',]
|
|
|
|
MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware',]
|
|
|
|
CACHES = {
|
|
'default': {
|
|
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
|
|
'LOCATION': 'C:/python/rowsandallapp/django_cache',
|
|
}
|
|
}
|
|
|
|
# Application definition
|
|
|
|
|
|
STATIC_URL = '/static/'
|
|
STATIC_ROOT = 'C:/python/rowsandallapp'
|
|
|
|
INTERNAL_IPS = ['127.0.0.1']
|
|
|
|
MEDIA_URL = '/media/'
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|
|
|
LOGIN_REDIRECT_URL = '/rowers/list-workouts/'
|
|
|
|
SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"
|
|
|
|
SITE_URL = "http://localhost:8000"
|
|
|
|
#EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
|
|
|
#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
|
|
#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
|
|
|
EMAIL_BACKEND = 'django_ses.SESBackend'
|
|
|
|
AWS_SES_REGION_NAME = 'us-west-2'
|
|
AWS_SES_REGION_ENDPOINT = 'email.us-west-2.amazonaws.com'
|
|
|
|
EMAIL_HOST = CFG['aws_smtp']
|
|
EMAIL_PORT = CFG['aws_port']
|
|
EMAIL_HOST_USER = CFG['aws_smtp_username']
|
|
EMAIL_HOST_PASSWORD = CFG['aws_smtp_password']
|
|
EMAIL_USE_TLS = CFG['email_use_tls']
|
|
DEFAULT_FROM_EMAIL = 'info@rowsandall.com'
|
|
|
|
|