Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify production DATABASES setting to extend base definition #3969

Merged

Conversation

adinhodovic
Copy link
Contributor

Description

Remove production db settings being instantiated twice when using docker.

Checklist:

  • I've made sure that tests are updated accordingly (especially if adding or updating a template option)
  • I've updated the documentation or confirm that my change doesn't require any updates

Rationale

I believe each env.db() resets the dict. Keep shared settings in base.py. Otherwise we have to redefine every db parameter, such as atomic requests.

@foarsitter
Copy link
Collaborator

This indeed looks like a duplicated definition, but why is there an exception needed for a non docker environment? The initialisation is the same right?

@browniebroke
Copy link
Member

This indeed looks like a duplicated definition, but why is there an exception needed for a non docker environment? The initialisation is the same right?

Thanks for bumping this discussion and raising this point, I have the same question. It feels like we could remove this altogether?

@adinhodovic
Copy link
Contributor Author

adinhodovic commented Dec 6, 2022

This indeed looks like a duplicated definition, but why is there an exception needed for a non docker environment? The initialisation is the same right?

Thanks for bumping this discussion and raising this point, I have the same question. It feels like we could remove this altogether?

Hmm, makes sense now when I took a second look can remove it altogether. Updated.

@browniebroke browniebroke changed the title fix: Remove production db settings being instantiated twice Simplify production database settings being reinstantiated from base Dec 6, 2022
@browniebroke browniebroke changed the title Simplify production database settings being reinstantiated from base Simplify production DATABASES setting Dec 6, 2022
@browniebroke browniebroke changed the title Simplify production DATABASES setting Simplify production DATABASES setting to extend base definition Dec 6, 2022
@browniebroke browniebroke merged commit 33af8e3 into cookiecutter:master Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants