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

Allow setting django_settings_module from the DJANGO_SETTINGS_MODULE env variable #2018

Closed
armanckeser opened this issue Mar 20, 2024 · 2 comments · Fixed by #2021
Closed

Comments

@armanckeser
Copy link
Contributor

armanckeser commented Mar 20, 2024

Hi there!

Hope everyone is doing alright! I have a use-case where I deploy my Django application with different INSTALLED_APPS in two different deployments. The least invasive way I found to do this was having two separate settings files and switching between them based on whichever one I am deploying. Things like pytest allow the setting of django_settings_module from both the environment and the pyproject.toml. It seems like django_stubs wants the settings to be static which doesn't really make sense to me considering Django has deemed it as an env variable for that flexibility.

Let me know if I am missing something, or if there is a workaround/fix that would be easier.

Thanks!

@sobolevn
Copy link
Member

We can try this, PR is welcome.

@armanckeser
Copy link
Contributor Author

@sobolevn Opened a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants