Skip to content

Commit

Permalink
Dedent DATABASES dict
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Nov 27, 2024
1 parent bc525ae commit 958c390
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions {{cookiecutter.project_slug}}/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@
DATABASES = {"default": db_url}
else:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": env.str("POSTGRES_DB"),
"USER": env.str("POSTGRES_USER"),
"PASSWORD": env.str("POSTGRES_PASSWORD"),
"HOST": env.str("POSTGRES_HOST", default="{% if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}localhost{%else%}postgres{% endif %}"),
"PORT": env.str("POSTGRES_PORT", default="5432"),
},
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": env.str("POSTGRES_DB"),
"USER": env.str("POSTGRES_USER"),
"PASSWORD": env.str("POSTGRES_PASSWORD"),
"HOST": env.str("POSTGRES_HOST", default="{% if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}localhost{%else%}postgres{% endif %}"),
"PORT": env.str("POSTGRES_PORT", default="5432"),
},
}

DATABASES["default"]["ATOMIC_REQUESTS"] = True
Expand Down

0 comments on commit 958c390

Please sign in to comment.