From 165abe0d6ee949adbb473107684684076643c74a Mon Sep 17 00:00:00 2001 From: Raymond Penners Date: Fri, 31 May 2024 13:38:18 +0200 Subject: [PATCH] docs: Don't rely on test settings --- docs/conf.py | 2 +- docs/settings.py | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 docs/settings.py diff --git a/docs/conf.py b/docs/conf.py index 140a8e43e7..bd8ba67b5e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -285,5 +285,5 @@ def setup(app): import django app.connect("build-finished", copy_custom_files) - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.account_only.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "docs.settings") django.setup() diff --git a/docs/settings.py b/docs/settings.py new file mode 100644 index 0000000000..eab47437ec --- /dev/null +++ b/docs/settings.py @@ -0,0 +1,36 @@ +SECRET_KEY = "psst" +USE_I18N = False +USE_TZ = True + + +MIDDLEWARE = ( + "django.contrib.sessions.middleware.SessionMiddleware", + "django.middleware.common.CommonMiddleware", + "django.middleware.csrf.CsrfViewMiddleware", + "django.contrib.auth.middleware.AuthenticationMiddleware", + "django.contrib.messages.middleware.MessageMiddleware", + "django.middleware.clickjacking.XFrameOptionsMiddleware", + "allauth.account.middleware.AccountMiddleware", +) + +INSTALLED_APPS = ( + "django.contrib.auth", + "django.contrib.contenttypes", + "django.contrib.sessions", + "django.contrib.sites", + "django.contrib.messages", + "django.contrib.staticfiles", + "django.contrib.admin", + "django.contrib.humanize", + "allauth", + "allauth.account", + "allauth.mfa", + "allauth.socialaccount", + "allauth.usersessions", + "allauth.headless", +) + +AUTHENTICATION_BACKENDS = ( + "django.contrib.auth.backends.ModelBackend", + "allauth.account.auth_backends.AuthenticationBackend", +)