Merge Django base settings

This commit is contained in:
Elia Bieri 2024-09-17 12:05:24 +02:00
parent f24fd040f9
commit 294c33ddc8
1 changed files with 8 additions and 2 deletions

View File

@ -59,8 +59,14 @@ DATABASES = {
default="postgres://postgres@localhost:5432/vbv_lernwelt",
)
}
DATABASES["default"]["ATOMIC_REQUESTS"] = True # noqa F405
DATABASES["default"]["CONN_MAX_AGE"] = env.int("CONN_MAX_AGE", default=60) # noqa F405
DATABASES["default"]["ATOMIC_REQUESTS"] = env.bool(
"DATABASE_ATOMIC_REQUESTS", default=True
)
DATABASES["default"]["CONN_MAX_AGE"] = env.int("DATABASE_CONN_MAX_AGE", default=0) # noqa F405
# set on 17.09.2024 https://docs.djangoproject.com/en/4.2/ref/databases/#transaction-pooling-server-side-cursors
DATABASES["default"]["DISABLE_SERVER_SIDE_CURSORS"] = env.bool(
"DATABASE_DISABLE_SERVER_SIDE_CURSORS", default=True
)
# https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-DEFAULT_AUTO_FIELD
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"