2016-04-13 00:23:00 +03:00
|
|
|
"""
|
2017-10-12 20:36:44 +03:00
|
|
|
Production settings for {{cookiecutter.project_name}} project.
|
2014-05-25 18:50:13 +04:00
|
|
|
|
2017-08-02 22:10:49 +03:00
|
|
|
{% if cookiecutter.use_whitenoise == 'y' -%}
|
|
|
|
- Use WhiteNoise for serving static files{% endif %}
|
2017-08-28 22:30:56 +03:00
|
|
|
- Use Amazon's S3 for storing {% if cookiecutter.use_whitenoise == 'n' -%}static files and {% endif %}uploaded media
|
2015-07-07 22:06:46 +03:00
|
|
|
- Use mailgun to send emails
|
2016-08-31 18:48:25 +03:00
|
|
|
- Use Redis for cache
|
2016-06-05 20:47:07 +03:00
|
|
|
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
2015-07-28 23:23:46 +03:00
|
|
|
- Use sentry for error logging
|
2015-07-27 18:42:23 +03:00
|
|
|
{% endif %}
|
2016-04-13 00:23:00 +03:00
|
|
|
{% if cookiecutter.use_opbeat == 'y' %}
|
2015-11-16 18:55:37 +03:00
|
|
|
- Use opbeat for error reporting
|
|
|
|
{% endif %}
|
2016-04-13 00:23:00 +03:00
|
|
|
"""
|
2015-04-20 00:09:00 +03:00
|
|
|
|
2016-06-05 20:47:07 +03:00
|
|
|
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
2015-07-28 23:23:46 +03:00
|
|
|
import logging
|
|
|
|
{% endif %}
|
2015-04-20 00:09:00 +03:00
|
|
|
|
2017-01-17 06:38:52 +03:00
|
|
|
from .base import * # noqa
|
2015-04-20 00:09:00 +03:00
|
|
|
|
2015-04-25 16:29:33 +03:00
|
|
|
# SECRET CONFIGURATION
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
|
2015-07-29 00:02:57 +03:00
|
|
|
# Raises ImproperlyConfigured exception if DJANGO_SECRET_KEY not in os.environ
|
2016-04-13 00:23:00 +03:00
|
|
|
SECRET_KEY = env('DJANGO_SECRET_KEY')
|
2015-04-25 16:29:33 +03:00
|
|
|
|
2016-06-04 02:07:27 +03:00
|
|
|
|
2015-04-20 00:09:00 +03:00
|
|
|
# This ensures that Django will be able to detect a secure connection
|
|
|
|
# properly on Heroku.
|
|
|
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
2016-06-05 20:47:07 +03:00
|
|
|
|
2016-06-05 21:04:48 +03:00
|
|
|
{%- if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
2015-07-27 18:42:23 +03:00
|
|
|
# raven sentry client
|
2016-12-01 01:32:38 +03:00
|
|
|
# See https://docs.sentry.io/clients/python/integrations/django/
|
2017-02-13 21:33:52 +03:00
|
|
|
INSTALLED_APPS += ['raven.contrib.django.raven_compat', ]
|
2016-06-04 02:07:27 +03:00
|
|
|
{% endif %}
|
|
|
|
{%- if cookiecutter.use_whitenoise == 'y' %}
|
2016-05-08 13:55:32 +03:00
|
|
|
# Use Whitenoise to serve static files
|
2016-05-09 23:18:58 +03:00
|
|
|
# See: https://whitenoise.readthedocs.io/
|
2017-02-13 21:33:52 +03:00
|
|
|
WHITENOISE_MIDDLEWARE = ['whitenoise.middleware.WhiteNoiseMiddleware', ]
|
2016-09-15 06:28:33 +03:00
|
|
|
MIDDLEWARE = WHITENOISE_MIDDLEWARE + MIDDLEWARE
|
2016-06-04 02:07:27 +03:00
|
|
|
{% endif %}
|
2016-06-05 20:47:07 +03:00
|
|
|
{%- if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
2017-02-13 21:33:52 +03:00
|
|
|
RAVEN_MIDDLEWARE = ['raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware']
|
2016-09-15 06:28:33 +03:00
|
|
|
MIDDLEWARE = RAVEN_MIDDLEWARE + MIDDLEWARE
|
2016-06-04 02:07:27 +03:00
|
|
|
{% endif %}
|
|
|
|
{%- if cookiecutter.use_opbeat == 'y' -%}
|
2015-11-16 18:55:37 +03:00
|
|
|
# opbeat integration
|
|
|
|
# See https://opbeat.com/languages/django/
|
2017-02-13 21:33:52 +03:00
|
|
|
INSTALLED_APPS += ['opbeat.contrib.django', ]
|
2015-11-16 18:55:37 +03:00
|
|
|
OPBEAT = {
|
|
|
|
'ORGANIZATION_ID': env('DJANGO_OPBEAT_ORGANIZATION_ID'),
|
|
|
|
'APP_ID': env('DJANGO_OPBEAT_APP_ID'),
|
|
|
|
'SECRET_TOKEN': env('DJANGO_OPBEAT_SECRET_TOKEN')
|
|
|
|
}
|
2017-02-13 21:33:52 +03:00
|
|
|
MIDDLEWARE = ['opbeat.contrib.django.middleware.OpbeatAPMMiddleware', ] + MIDDLEWARE
|
2016-06-04 02:07:27 +03:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
# SECURITY CONFIGURATION
|
|
|
|
# ------------------------------------------------------------------------------
|
2017-02-21 22:55:51 +03:00
|
|
|
# See https://docs.djangoproject.com/en/dev/ref/middleware/#module-django.middleware.security
|
|
|
|
# and https://docs.djangoproject.com/en/dev/howto/deployment/checklist/#run-manage-py-check-deploy
|
2016-06-04 02:07:27 +03:00
|
|
|
|
2015-04-20 00:09:00 +03:00
|
|
|
# set this to 60 seconds and then to 518400 when you can prove it works
|
|
|
|
SECURE_HSTS_SECONDS = 60
|
2015-07-28 23:23:46 +03:00
|
|
|
SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool(
|
2016-04-13 00:23:00 +03:00
|
|
|
'DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS', default=True)
|
2015-07-28 23:23:46 +03:00
|
|
|
SECURE_CONTENT_TYPE_NOSNIFF = env.bool(
|
2016-04-13 00:23:00 +03:00
|
|
|
'DJANGO_SECURE_CONTENT_TYPE_NOSNIFF', default=True)
|
2015-04-20 00:09:00 +03:00
|
|
|
SECURE_BROWSER_XSS_FILTER = True
|
2016-06-04 02:07:27 +03:00
|
|
|
SESSION_COOKIE_SECURE = True
|
2015-04-20 00:09:00 +03:00
|
|
|
SESSION_COOKIE_HTTPONLY = True
|
2016-04-13 00:23:00 +03:00
|
|
|
SECURE_SSL_REDIRECT = env.bool('DJANGO_SECURE_SSL_REDIRECT', default=True)
|
2016-06-04 02:07:27 +03:00
|
|
|
CSRF_COOKIE_SECURE = True
|
|
|
|
CSRF_COOKIE_HTTPONLY = True
|
|
|
|
X_FRAME_OPTIONS = 'DENY'
|
2015-04-20 00:09:00 +03:00
|
|
|
|
|
|
|
# SITE CONFIGURATION
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Hosts/domain names that are valid for this site
|
2017-02-21 22:55:51 +03:00
|
|
|
# See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
2017-02-13 21:33:52 +03:00
|
|
|
ALLOWED_HOSTS = env.list('DJANGO_ALLOWED_HOSTS', default=['{{cookiecutter.domain_name}}', ])
|
2015-04-20 00:09:00 +03:00
|
|
|
# END SITE CONFIGURATION
|
|
|
|
|
2017-02-13 21:33:52 +03:00
|
|
|
INSTALLED_APPS += ['gunicorn', ]
|
2015-04-20 00:09:00 +03:00
|
|
|
|
2016-06-04 02:07:27 +03:00
|
|
|
|
2015-04-20 00:09:00 +03:00
|
|
|
# STORAGE CONFIGURATION
|
|
|
|
# ------------------------------------------------------------------------------
|
2015-04-26 12:57:45 +03:00
|
|
|
# Uploaded Media Files
|
|
|
|
# ------------------------
|
2016-05-09 23:18:58 +03:00
|
|
|
# See: http://django-storages.readthedocs.io/en/latest/index.html
|
2017-02-13 21:33:52 +03:00
|
|
|
INSTALLED_APPS += ['storages', ]
|
2015-04-20 00:09:00 +03:00
|
|
|
|
2015-04-24 15:12:34 +03:00
|
|
|
AWS_ACCESS_KEY_ID = env('DJANGO_AWS_ACCESS_KEY_ID')
|
|
|
|
AWS_SECRET_ACCESS_KEY = env('DJANGO_AWS_SECRET_ACCESS_KEY')
|
|
|
|
AWS_STORAGE_BUCKET_NAME = env('DJANGO_AWS_STORAGE_BUCKET_NAME')
|
2015-04-20 00:09:00 +03:00
|
|
|
AWS_AUTO_CREATE_BUCKET = True
|
|
|
|
AWS_QUERYSTRING_AUTH = False
|
|
|
|
|
|
|
|
# AWS cache settings, don't change unless you know what you're doing:
|
|
|
|
AWS_EXPIRY = 60 * 60 * 24 * 7
|
2015-04-24 21:32:37 +03:00
|
|
|
|
2018-02-13 18:04:43 +03:00
|
|
|
AWS_S3_OBJECT_PARAMETERS = {
|
2018-02-20 11:04:16 +03:00
|
|
|
'CacheControl': 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIRY, AWS_EXPIRY),
|
2015-04-20 00:09:00 +03:00
|
|
|
}
|
|
|
|
|
2015-07-28 23:23:46 +03:00
|
|
|
# URL that handles the media served from MEDIA_ROOT, used for managing
|
|
|
|
# stored files.
|
2016-03-02 17:49:34 +03:00
|
|
|
{% if cookiecutter.use_whitenoise == 'y' -%}
|
2015-04-26 12:57:45 +03:00
|
|
|
MEDIA_URL = 'https://s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME
|
2017-08-02 22:10:49 +03:00
|
|
|
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
|
2016-03-02 17:49:34 +03:00
|
|
|
{% else %}
|
2016-03-03 00:02:28 +03:00
|
|
|
# See:http://stackoverflow.com/questions/10390244/
|
2017-08-02 22:00:03 +03:00
|
|
|
from storages.backends.s3boto3 import S3Boto3Storage
|
2017-10-12 20:36:44 +03:00
|
|
|
StaticRootS3BotoStorage = lambda: S3Boto3Storage(location='static') # noqa
|
2017-12-13 16:06:48 +03:00
|
|
|
MediaRootS3BotoStorage = lambda: S3Boto3Storage(location='media', file_overwrite=False) # noqa
|
2016-03-03 00:02:28 +03:00
|
|
|
DEFAULT_FILE_STORAGE = 'config.settings.production.MediaRootS3BotoStorage'
|
|
|
|
|
2016-03-02 17:49:34 +03:00
|
|
|
MEDIA_URL = 'https://s3.amazonaws.com/%s/media/' % AWS_STORAGE_BUCKET_NAME
|
|
|
|
{%- endif %}
|
2015-04-26 12:57:45 +03:00
|
|
|
|
2015-09-17 14:09:26 +03:00
|
|
|
# Static Assets
|
2015-04-26 12:57:45 +03:00
|
|
|
# ------------------------
|
|
|
|
{% if cookiecutter.use_whitenoise == 'y' -%}
|
2016-05-08 13:55:32 +03:00
|
|
|
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
2015-04-26 12:57:45 +03:00
|
|
|
{% else %}
|
2016-03-02 17:49:34 +03:00
|
|
|
STATIC_URL = 'https://s3.amazonaws.com/%s/static/' % AWS_STORAGE_BUCKET_NAME
|
2016-03-03 00:02:28 +03:00
|
|
|
STATICFILES_STORAGE = 'config.settings.production.StaticRootS3BotoStorage'
|
2015-04-26 12:57:45 +03:00
|
|
|
# See: https://github.com/antonagestam/collectfast
|
2015-07-28 23:23:46 +03:00
|
|
|
# For Django 1.7+, 'collectfast' should come before
|
|
|
|
# 'django.contrib.staticfiles'
|
2015-04-26 12:57:45 +03:00
|
|
|
AWS_PRELOAD_METADATA = True
|
2017-02-13 21:33:52 +03:00
|
|
|
INSTALLED_APPS = ['collectfast', ] + INSTALLED_APPS
|
2015-04-26 12:57:45 +03:00
|
|
|
{%- endif %}
|
2016-06-18 05:07:45 +03:00
|
|
|
{% if cookiecutter.use_compressor == 'y'-%}
|
|
|
|
# COMPRESSOR
|
|
|
|
# ------------------------------------------------------------------------------
|
2017-08-02 22:00:03 +03:00
|
|
|
COMPRESS_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
|
2016-06-18 05:07:45 +03:00
|
|
|
COMPRESS_URL = STATIC_URL
|
|
|
|
COMPRESS_ENABLED = env.bool('COMPRESS_ENABLED', default=True)
|
|
|
|
{%- endif %}
|
2015-04-20 00:09:00 +03:00
|
|
|
# EMAIL
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
DEFAULT_FROM_EMAIL = env('DJANGO_DEFAULT_FROM_EMAIL',
|
|
|
|
default='{{cookiecutter.project_name}} <noreply@{{cookiecutter.domain_name}}>')
|
2017-02-13 21:33:52 +03:00
|
|
|
EMAIL_SUBJECT_PREFIX = env('DJANGO_EMAIL_SUBJECT_PREFIX', default='[{{cookiecutter.project_name}}]')
|
2015-07-16 12:10:36 +03:00
|
|
|
SERVER_EMAIL = env('DJANGO_SERVER_EMAIL', default=DEFAULT_FROM_EMAIL)
|
2016-05-27 21:31:30 +03:00
|
|
|
|
|
|
|
# Anymail with Mailgun
|
2017-02-13 21:33:52 +03:00
|
|
|
INSTALLED_APPS += ['anymail', ]
|
2016-05-27 21:31:30 +03:00
|
|
|
ANYMAIL = {
|
2017-02-13 21:33:52 +03:00
|
|
|
'MAILGUN_API_KEY': env('DJANGO_MAILGUN_API_KEY'),
|
|
|
|
'MAILGUN_SENDER_DOMAIN': env('MAILGUN_SENDER_DOMAIN')
|
2016-05-27 21:31:30 +03:00
|
|
|
}
|
2017-09-18 16:19:09 +03:00
|
|
|
EMAIL_BACKEND = 'anymail.backends.mailgun.EmailBackend'
|
2016-05-27 21:31:30 +03:00
|
|
|
|
2015-04-20 00:09:00 +03:00
|
|
|
# TEMPLATE CONFIGURATION
|
|
|
|
# ------------------------------------------------------------------------------
|
2015-07-28 23:23:46 +03:00
|
|
|
# See:
|
|
|
|
# https://docs.djangoproject.com/en/dev/ref/templates/api/#django.template.loaders.cached.Loader
|
2015-05-08 05:13:49 +03:00
|
|
|
TEMPLATES[0]['OPTIONS']['loaders'] = [
|
|
|
|
('django.template.loaders.cached.Loader', [
|
2015-07-29 00:02:57 +03:00
|
|
|
'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ]),
|
2015-05-08 05:13:49 +03:00
|
|
|
]
|
2018-03-04 17:33:54 +03:00
|
|
|
|
2015-04-20 00:09:00 +03:00
|
|
|
# DATABASE CONFIGURATION
|
|
|
|
# ------------------------------------------------------------------------------
|
2016-04-13 00:23:00 +03:00
|
|
|
DATABASES['default'] = env.db('DATABASE_URL')
|
2018-02-16 18:15:50 +03:00
|
|
|
DATABASES['default']['ATOMIC_REQUESTS'] = True
|
2018-03-04 17:33:54 +03:00
|
|
|
DATABASES['default']['CONN_MAX_AGE'] = env.int('CONN_MAX_AGE', default=60)
|
2015-04-20 00:09:00 +03:00
|
|
|
|
|
|
|
# CACHING
|
|
|
|
# ------------------------------------------------------------------------------
|
2016-09-23 04:21:00 +03:00
|
|
|
REDIS_LOCATION = '{0}/{1}'.format(env('REDIS_URL', default='redis://127.0.0.1:6379'), 0)
|
2018-01-15 23:33:51 +03:00
|
|
|
|
2015-07-06 13:43:26 +03:00
|
|
|
# Heroku URL does not pass the DB number, so we parse it in
|
|
|
|
CACHES = {
|
2016-04-13 00:23:00 +03:00
|
|
|
'default': {
|
|
|
|
'BACKEND': 'django_redis.cache.RedisCache',
|
2016-09-23 04:21:00 +03:00
|
|
|
'LOCATION': REDIS_LOCATION,
|
2016-04-13 00:23:00 +03:00
|
|
|
'OPTIONS': {
|
|
|
|
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
|
|
|
|
'IGNORE_EXCEPTIONS': True, # mimics memcache behavior.
|
2015-07-06 13:43:26 +03:00
|
|
|
# http://niwinz.github.io/django-redis/latest/#_memcached_exceptions_behavior
|
|
|
|
}
|
2015-04-20 00:09:00 +03:00
|
|
|
}
|
2015-07-06 13:43:26 +03:00
|
|
|
}
|
2015-04-20 00:09:00 +03:00
|
|
|
|
2016-06-05 20:47:07 +03:00
|
|
|
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
2015-07-27 18:42:23 +03:00
|
|
|
# Sentry Configuration
|
2015-09-02 23:10:37 +03:00
|
|
|
SENTRY_DSN = env('DJANGO_SENTRY_DSN')
|
|
|
|
SENTRY_CLIENT = env('DJANGO_SENTRY_CLIENT', default='raven.contrib.django.raven_compat.DjangoClient')
|
2015-07-27 18:42:23 +03:00
|
|
|
LOGGING = {
|
|
|
|
'version': 1,
|
|
|
|
'disable_existing_loggers': True,
|
|
|
|
'root': {
|
|
|
|
'level': 'WARNING',
|
2017-02-13 21:33:52 +03:00
|
|
|
'handlers': ['sentry', ],
|
2015-07-27 18:42:23 +03:00
|
|
|
},
|
|
|
|
'formatters': {
|
|
|
|
'verbose': {
|
|
|
|
'format': '%(levelname)s %(asctime)s %(module)s '
|
|
|
|
'%(process)d %(thread)d %(message)s'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'handlers': {
|
|
|
|
'sentry': {
|
|
|
|
'level': 'ERROR',
|
|
|
|
'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler',
|
|
|
|
},
|
|
|
|
'console': {
|
|
|
|
'level': 'DEBUG',
|
|
|
|
'class': 'logging.StreamHandler',
|
|
|
|
'formatter': 'verbose'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'loggers': {
|
|
|
|
'django.db.backends': {
|
|
|
|
'level': 'ERROR',
|
2017-02-13 21:33:52 +03:00
|
|
|
'handlers': ['console', ],
|
2015-07-27 18:42:23 +03:00
|
|
|
'propagate': False,
|
|
|
|
},
|
|
|
|
'raven': {
|
|
|
|
'level': 'DEBUG',
|
2017-02-13 21:33:52 +03:00
|
|
|
'handlers': ['console', ],
|
2015-07-27 18:42:23 +03:00
|
|
|
'propagate': False,
|
|
|
|
},
|
|
|
|
'sentry.errors': {
|
|
|
|
'level': 'DEBUG',
|
2017-02-13 21:33:52 +03:00
|
|
|
'handlers': ['console', ],
|
2015-07-27 18:42:23 +03:00
|
|
|
'propagate': False,
|
|
|
|
},
|
2015-09-02 23:59:40 +03:00
|
|
|
'django.security.DisallowedHost': {
|
|
|
|
'level': 'ERROR',
|
2017-02-13 21:33:52 +03:00
|
|
|
'handlers': ['console', 'sentry', ],
|
2015-09-02 23:59:40 +03:00
|
|
|
'propagate': False,
|
|
|
|
},
|
2015-07-27 18:42:23 +03:00
|
|
|
},
|
|
|
|
}
|
2015-09-02 23:10:37 +03:00
|
|
|
SENTRY_CELERY_LOGLEVEL = env.int('DJANGO_SENTRY_LOG_LEVEL', logging.INFO)
|
2015-07-27 18:42:23 +03:00
|
|
|
RAVEN_CONFIG = {
|
2015-09-02 23:10:37 +03:00
|
|
|
'CELERY_LOGLEVEL': env.int('DJANGO_SENTRY_LOG_LEVEL', logging.INFO),
|
|
|
|
'DSN': SENTRY_DSN
|
2015-07-27 18:42:23 +03:00
|
|
|
}
|
2016-06-05 20:47:07 +03:00
|
|
|
{% elif cookiecutter.use_sentry_for_error_reporting == 'n' %}
|
2015-10-26 01:30:36 +03:00
|
|
|
# LOGGING CONFIGURATION
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#logging
|
|
|
|
# A sample logging configuration. The only tangible logging
|
|
|
|
# performed by this configuration is to send an email to
|
|
|
|
# the site admins on every HTTP 500 error when DEBUG=False.
|
2017-02-21 22:55:51 +03:00
|
|
|
# See https://docs.djangoproject.com/en/dev/topics/logging for
|
2015-10-26 01:30:36 +03:00
|
|
|
# more details on how to customize your logging configuration.
|
|
|
|
LOGGING = {
|
|
|
|
'version': 1,
|
|
|
|
'disable_existing_loggers': False,
|
|
|
|
'filters': {
|
|
|
|
'require_debug_false': {
|
|
|
|
'()': 'django.utils.log.RequireDebugFalse'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'formatters': {
|
|
|
|
'verbose': {
|
|
|
|
'format': '%(levelname)s %(asctime)s %(module)s '
|
|
|
|
'%(process)d %(thread)d %(message)s'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'handlers': {
|
|
|
|
'mail_admins': {
|
|
|
|
'level': 'ERROR',
|
2017-02-13 21:33:52 +03:00
|
|
|
'filters': ['require_debug_false', ],
|
2015-10-26 01:30:36 +03:00
|
|
|
'class': 'django.utils.log.AdminEmailHandler'
|
|
|
|
},
|
|
|
|
'console': {
|
|
|
|
'level': 'DEBUG',
|
|
|
|
'class': 'logging.StreamHandler',
|
|
|
|
'formatter': 'verbose',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'loggers': {
|
|
|
|
'django.request': {
|
2017-02-13 21:33:52 +03:00
|
|
|
'handlers': ['mail_admins', ],
|
2015-10-26 01:30:36 +03:00
|
|
|
'level': 'ERROR',
|
|
|
|
'propagate': True
|
|
|
|
},
|
|
|
|
'django.security.DisallowedHost': {
|
|
|
|
'level': 'ERROR',
|
2017-02-13 21:33:52 +03:00
|
|
|
'handlers': ['console', 'mail_admins', ],
|
2015-10-26 01:30:36 +03:00
|
|
|
'propagate': True
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-07-27 18:42:23 +03:00
|
|
|
{% endif %}
|
2015-10-04 01:42:33 +03:00
|
|
|
# Custom Admin URL, use {% raw %}{% url 'admin:index' %}{% endraw %}
|
2015-10-04 03:08:11 +03:00
|
|
|
ADMIN_URL = env('DJANGO_ADMIN_URL')
|
2015-10-04 00:54:29 +03:00
|
|
|
|
2015-04-20 00:09:00 +03:00
|
|
|
# Your production stuff: Below this line define 3rd party library settings
|
2016-08-31 18:56:25 +03:00
|
|
|
# ------------------------------------------------------------------------------
|