2017-06-23 21:00:42 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2018-06-09 13:36:16 +00:00
|
|
|
"""
|
2017-06-23 21:00:42 +00:00
|
|
|
Local settings
|
|
|
|
|
|
|
|
- Run in Debug mode
|
|
|
|
- Use console backend for emails
|
|
|
|
- Add Django Debug Toolbar
|
|
|
|
- Add django-extensions as app
|
2018-06-09 13:36:16 +00:00
|
|
|
"""
|
2017-06-23 21:00:42 +00:00
|
|
|
|
|
|
|
from .common import * # noqa
|
|
|
|
|
|
|
|
# DEBUG
|
|
|
|
# ------------------------------------------------------------------------------
|
2018-06-09 13:36:16 +00:00
|
|
|
DEBUG = env.bool("DJANGO_DEBUG", default=True)
|
|
|
|
TEMPLATES[0]["OPTIONS"]["debug"] = DEBUG
|
2017-06-23 21:00:42 +00:00
|
|
|
|
|
|
|
# SECRET CONFIGURATION
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
|
|
|
|
# Note: This key only used for development and testing.
|
2018-06-09 13:36:16 +00:00
|
|
|
SECRET_KEY = env(
|
|
|
|
"DJANGO_SECRET_KEY", default="mc$&b=5j#6^bv7tld1gyjp2&+^-qrdy=0sw@r5sua*1zp4fmxc"
|
|
|
|
)
|
2017-06-23 21:00:42 +00:00
|
|
|
|
|
|
|
# Mail settings
|
|
|
|
# ------------------------------------------------------------------------------
|
2018-06-09 13:36:16 +00:00
|
|
|
EMAIL_HOST = "localhost"
|
2017-06-23 21:00:42 +00:00
|
|
|
EMAIL_PORT = 1025
|
|
|
|
|
|
|
|
# django-debug-toolbar
|
|
|
|
# ------------------------------------------------------------------------------
|
2018-06-09 13:36:16 +00:00
|
|
|
MIDDLEWARE += ("debug_toolbar.middleware.DebugToolbarMiddleware",)
|
2017-06-23 21:00:42 +00:00
|
|
|
|
|
|
|
# INTERNAL_IPS = ('127.0.0.1', '10.0.2.2',)
|
|
|
|
|
|
|
|
DEBUG_TOOLBAR_CONFIG = {
|
2018-06-09 13:36:16 +00:00
|
|
|
"DISABLE_PANELS": ["debug_toolbar.panels.redirects.RedirectsPanel"],
|
|
|
|
"SHOW_TEMPLATE_CONTEXT": True,
|
|
|
|
"SHOW_TOOLBAR_CALLBACK": lambda request: True,
|
2017-06-23 21:00:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# django-extensions
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# INSTALLED_APPS += ('django_extensions', )
|
2018-06-09 13:36:16 +00:00
|
|
|
INSTALLED_APPS += ("debug_toolbar",)
|
2017-06-23 21:00:42 +00:00
|
|
|
|
|
|
|
# TESTING
|
|
|
|
# ------------------------------------------------------------------------------
|
2018-06-09 13:36:16 +00:00
|
|
|
TEST_RUNNER = "django.test.runner.DiscoverRunner"
|
2017-06-23 21:00:42 +00:00
|
|
|
|
|
|
|
########## CELERY
|
|
|
|
# In development, all tasks will be executed locally by blocking until the task returns
|
2017-12-26 20:12:37 +00:00
|
|
|
CELERY_TASK_ALWAYS_EAGER = False
|
2017-06-23 21:00:42 +00:00
|
|
|
########## END CELERY
|
|
|
|
|
|
|
|
# Your local stuff: Below this line define 3rd party library settings
|
|
|
|
|
|
|
|
LOGGING = {
|
2018-06-09 13:36:16 +00:00
|
|
|
"version": 1,
|
|
|
|
"handlers": {"console": {"level": "DEBUG", "class": "logging.StreamHandler"}},
|
|
|
|
"loggers": {
|
|
|
|
"django.request": {
|
|
|
|
"handlers": ["console"],
|
|
|
|
"propagate": True,
|
|
|
|
"level": "DEBUG",
|
2018-03-31 16:41:53 +00:00
|
|
|
},
|
2018-06-09 13:36:16 +00:00
|
|
|
"": {"level": "DEBUG", "handlers": ["console"]},
|
2017-06-23 21:00:42 +00:00
|
|
|
},
|
|
|
|
}
|
2018-06-02 07:21:55 +00:00
|
|
|
CSRF_TRUSTED_ORIGINS = [o for o in ALLOWED_HOSTS]
|