Skip to content

Commit

Permalink
docs: Don't rely on test settings
Browse files Browse the repository at this point in the history
  • Loading branch information
pennersr committed May 31, 2024
1 parent 73efc84 commit 165abe0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
36 changes: 36 additions & 0 deletions docs/settings.py
Original file line number Diff line number Diff line change
@@ -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",
)

0 comments on commit 165abe0

Please sign in to comment.