mirror of
https://github.com/marking-hack/backend.git
synced 2024-11-10 20:36:34 +03:00
62 lines
2.6 KiB
Python
62 lines
2.6 KiB
Python
|
from .base import * # noqa
|
||
|
from .base import env
|
||
|
|
||
|
# GENERAL
|
||
|
# ------------------------------------------------------------------------------
|
||
|
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
||
|
DEBUG = True
|
||
|
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
|
||
|
SECRET_KEY = env(
|
||
|
"DJANGO_SECRET_KEY",
|
||
|
default="OUKFQXgTXGLApyNntMc7YrwGwc1Sgejj0C7OXNiAko7wMoXPkacvOdC6YukmBsIB",
|
||
|
)
|
||
|
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
||
|
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "dev2.akarpov.ru"]
|
||
|
CORS_ORIGIN_ALLOW_ALL = True
|
||
|
|
||
|
# CACHES
|
||
|
# ------------------------------------------------------------------------------
|
||
|
# https://docs.djangoproject.com/en/dev/ref/settings/#caches
|
||
|
CACHES = {
|
||
|
"default": {
|
||
|
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
|
||
|
"LOCATION": "",
|
||
|
}
|
||
|
}
|
||
|
|
||
|
# WhiteNoise
|
||
|
# ------------------------------------------------------------------------------
|
||
|
# http://whitenoise.evans.io/en/latest/django.html#using-whitenoise-in-development
|
||
|
INSTALLED_APPS = ["whitenoise.runserver_nostatic"] + INSTALLED_APPS # noqa F405
|
||
|
|
||
|
|
||
|
# django-debug-toolbar
|
||
|
# ------------------------------------------------------------------------------
|
||
|
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#prerequisites
|
||
|
INSTALLED_APPS += ["debug_toolbar"] # noqa F405
|
||
|
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#middleware
|
||
|
MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"] # noqa F405
|
||
|
# https://django-debug-toolbar.readthedocs.io/en/latest/configuration.html#debug-toolbar-config
|
||
|
DEBUG_TOOLBAR_CONFIG = {
|
||
|
"DISABLE_PANELS": ["debug_toolbar.panels.redirects.RedirectsPanel"],
|
||
|
"SHOW_TEMPLATE_CONTEXT": True,
|
||
|
}
|
||
|
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#internal-ips
|
||
|
INTERNAL_IPS = ["127.0.0.1", "10.0.2.2"]
|
||
|
if env("USE_DOCKER") == "yes":
|
||
|
import socket
|
||
|
|
||
|
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
||
|
INTERNAL_IPS += [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips]
|
||
|
|
||
|
# django-extensions
|
||
|
# ------------------------------------------------------------------------------
|
||
|
# https://django-extensions.readthedocs.io/en/latest/installation_instructions.html#configuration
|
||
|
INSTALLED_APPS += ["django_extensions"] # noqa F405
|
||
|
# Celery
|
||
|
# ------------------------------------------------------------------------------
|
||
|
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#task-eager-propagates
|
||
|
CELERY_TASK_EAGER_PROPAGATES = True
|
||
|
# Your stuff...
|
||
|
# ------------------------------------------------------------------------------
|