from .base import *  # noqa: F403
from .utils import get_current_version


SECRET_KEY = "mv4&5#+)-=abz3^&1r^nk_ca6y54--p(4n4cg%z*g&rb64j%wl"

MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"]  # noqa: F405

EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"

INSTALLED_APPS += ["debug_toolbar", "django_extensions"]  # noqa: F405


TEMPLATES[0]["OPTIONS"]["context_processors"].append(  # noqa: F405
    "django.template.context_processors.debug",
)

# Project settings
VERSION = get_current_version()

# Third party settings
AXES_FAILURE_LIMIT = 50
AXES_COOLOFF_TIME = None

try:
    # Optionally use sentry integration
    from sentry_sdk import init as sentry_init

    from .local import *  # noqa

    SENTRY_CONFIG.update({"release": VERSION})  # noqa: F405

    sentry_init(**SENTRY_CONFIG)  # noqa: F405
except ImportError:
    pass
