2016-12-20 19:43:16 +00:00
|
|
|
# coding=utf-8
|
|
|
|
from .common import *
|
2012-05-07 19:05:58 +00:00
|
|
|
|
2016-05-06 23:06:50 +00:00
|
|
|
ALLOWED_HOSTS = ['.unglue.it']
|
2012-05-07 19:05:58 +00:00
|
|
|
DEBUG = False
|
2016-09-07 22:15:23 +00:00
|
|
|
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
|
2012-05-07 19:05:58 +00:00
|
|
|
|
2012-05-07 19:06:59 +00:00
|
|
|
SITE_ID = 5
|
2012-05-07 19:05:58 +00:00
|
|
|
|
|
|
|
ADMINS = (
|
|
|
|
('Raymond Yee', 'rdhyee+ungluebugs@gluejar.com'),
|
|
|
|
('Eric Hellman', 'eric@gluejar.com'),
|
|
|
|
)
|
|
|
|
|
|
|
|
MANAGERS = ADMINS
|
|
|
|
|
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
|
|
|
'ENGINE': 'django.db.backends.mysql',
|
|
|
|
'NAME': 'unglueit',
|
2016-12-21 19:36:06 +00:00
|
|
|
'USER': DATABASE_USER,
|
|
|
|
'PASSWORD': DATABASE_PASSWORD,
|
|
|
|
'HOST': DATABASE_HOST,
|
2012-05-07 19:05:58 +00:00
|
|
|
'PORT': '',
|
2015-05-18 19:38:09 +00:00
|
|
|
'TEST_CHARSET': 'utf8'
|
2012-05-07 19:05:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
TIME_ZONE = 'America/New_York'
|
|
|
|
|
2016-12-20 19:43:16 +00:00
|
|
|
# settings for outbout email
|
|
|
|
# if you have a gmail account you can use your email address and password
|
2016-12-12 21:56:42 +00:00
|
|
|
|
2016-12-17 22:49:17 +00:00
|
|
|
# Amazon SES
|
2012-06-22 23:38:29 +00:00
|
|
|
|
|
|
|
EMAIL_BACKEND = 'django_smtp_ssl.SSLEmailBackend'
|
|
|
|
MAIL_USE_TLS = True
|
|
|
|
EMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com'
|
|
|
|
EMAIL_PORT = 465
|
|
|
|
DEFAULT_FROM_EMAIL = 'notices@gluejar.com'
|
2012-05-07 19:05:58 +00:00
|
|
|
|
|
|
|
# send celery log to Python logging
|
|
|
|
CELERYD_HIJACK_ROOT_LOGGER = False
|
|
|
|
|
|
|
|
# Next step to try https
|
2015-08-25 15:07:11 +00:00
|
|
|
#BASE_URL = 'http://just.unglue.it'
|
2013-09-11 17:43:49 +00:00
|
|
|
BASE_URL_SECURE = 'https://just.unglue.it'
|
2012-05-16 00:12:58 +00:00
|
|
|
IPN_SECURE_URL = False
|
2012-05-07 19:05:58 +00:00
|
|
|
|
|
|
|
# use redis for production queue
|
|
|
|
BROKER_TRANSPORT = "redis"
|
|
|
|
BROKER_HOST = "localhost"
|
|
|
|
BROKER_PORT = 6379
|
|
|
|
BROKER_VHOST = "0"
|
|
|
|
|
|
|
|
LOGGING = {
|
|
|
|
'version': 1,
|
|
|
|
'disable_existing_loggers': True,
|
2016-06-20 19:58:10 +00:00
|
|
|
'formatters': {
|
|
|
|
'brief': {
|
|
|
|
'format': '%(asctime)s %(levelname)s %(name)s[%(funcName)s]: %(message)s',
|
|
|
|
},
|
|
|
|
},
|
2012-05-07 19:05:58 +00:00
|
|
|
'handlers': {
|
|
|
|
'mail_admins': {
|
|
|
|
'level': 'ERROR',
|
|
|
|
'class': 'django.utils.log.AdminEmailHandler'
|
|
|
|
},
|
2016-05-11 13:12:42 +00:00
|
|
|
'null': {
|
|
|
|
'level': 'DEBUG',
|
|
|
|
'class': 'logging.NullHandler',
|
|
|
|
},
|
2016-06-20 19:50:57 +00:00
|
|
|
'file': {
|
|
|
|
'level': 'INFO',
|
|
|
|
'class': 'logging.handlers.RotatingFileHandler',
|
2016-06-20 20:50:47 +00:00
|
|
|
'filename': join('/var/log/regluit', 'unglue.it.log'),
|
2016-06-20 19:50:57 +00:00
|
|
|
'maxBytes': 1024*1024*5, # 5 MB
|
|
|
|
'backupCount': 5,
|
|
|
|
'formatter': 'brief',
|
|
|
|
},
|
2012-05-07 19:05:58 +00:00
|
|
|
},
|
|
|
|
'loggers': {
|
|
|
|
'django.request': {
|
|
|
|
'handlers': ['mail_admins'],
|
|
|
|
'level': 'ERROR',
|
|
|
|
'propagate': True,
|
|
|
|
},
|
2016-05-11 13:12:42 +00:00
|
|
|
'django.security.DisallowedHost': {
|
|
|
|
'handlers': ['null'],
|
|
|
|
'propagate': False,
|
|
|
|
},
|
2016-06-20 20:07:09 +00:00
|
|
|
'': {
|
2016-06-20 19:50:57 +00:00
|
|
|
'handlers': ['file'],
|
|
|
|
'level': 'WARNING',
|
2016-06-20 20:07:09 +00:00
|
|
|
'propagate': False,
|
2016-06-20 19:50:57 +00:00
|
|
|
},
|
2012-05-07 19:05:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
STATIC_ROOT = '/var/www/static'
|
2013-02-11 19:18:16 +00:00
|
|
|
#CKEDITOR_UPLOAD_PATH = '/var/www/static/media/'
|
|
|
|
#CKEDITOR_UPLOAD_PREFIX = 'https://just.unglue.it/static/media/'
|
2012-05-07 19:05:58 +00:00
|
|
|
|
|
|
|
IS_PREVIEW = False
|
|
|
|
|
|
|
|
# decide which of the period tasks to add to the schedule
|
2014-10-10 19:39:43 +00:00
|
|
|
CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB
|
2012-05-07 19:05:58 +00:00
|
|
|
CELERYBEAT_SCHEDULE['report_new_ebooks'] = EBOOK_NOTIFICATIONS_JOB
|
|
|
|
|
|
|
|
|
2013-03-04 18:29:53 +00:00
|
|
|
CELERYBEAT_SCHEDULE['update_account_statuses'] = UPDATE_ACCOUNT_STATUSES
|
2013-03-04 19:19:13 +00:00
|
|
|
CELERYBEAT_SCHEDULE['notify_expiring_accounts'] = NOTIFY_EXPIRING_ACCOUNTS
|
2013-11-08 17:13:34 +00:00
|
|
|
CELERYBEAT_SCHEDULE['refresh_acqs'] = REFRESH_ACQS_JOB
|
|
|
|
|
2012-05-10 16:03:10 +00:00
|
|
|
|
|
|
|
# set -- sandbox or production Amazon FPS?
|
|
|
|
AMAZON_FPS_HOST = "fps.sandbox.amazonaws.com"
|
|
|
|
#AMAZON_FPS_HOST = "fps.amazonaws.com"
|
2012-05-07 19:05:58 +00:00
|
|
|
|
2012-05-17 20:56:44 +00:00
|
|
|
# local settings for maintenance mode
|
2016-09-08 18:42:27 +00:00
|
|
|
MAINTENANCE_MODE = False
|
2012-05-17 20:56:44 +00:00
|
|
|
|
2012-05-07 19:05:58 +00:00
|
|
|
# if settings/local.py exists, import those settings -- allows for dynamic generation of parameters such as DATABASES
|
|
|
|
try:
|
|
|
|
from regluit.settings.local import *
|
|
|
|
except ImportError:
|
|
|
|
pass
|