DATABASES setting for Django not being set
See original GitHub issuedynaconf is properly showing the settings I put into /etc/pulp/settings.py
(pulp) [vagrant@pulp3 pulp]$ dynaconf list -k DATABASES
Django app detected
Working in development environment
DATABASES: {'default': {'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.dummy',
'HOST': 'postgres',
'NAME': 'pulp',
'PORT': '5432',
'USER': 'pulp'}}
However, django is not using the setting. It seems like Django is loading the settings for the database before dynaconf is loaded.
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
DATABASES setting for Django not being set #89 - GitHub
The case is that Django is creating the database connection before it loads the INSTALLED_APPS where dynaconf is supposed to be loaded. Django...
Read more >Django settings.DATABASE 'default' value is not set
I have the 'mioa' entry in there to demonstrate my problem. For some reason, the 'default' field is not getting set. Does anyone...
Read more >Settings - Django documentation
You can use a database backend that doesn't ship with Django by setting ENGINE to a fully-qualified path (i.e. mypackage.backends.whatever ).
Read more >Databases | Django documentation
When Django establishes a connection to the database, it sets up appropriate parameters, depending on the backend being used. If you enable persistent ......
Read more >Multiple databases | Django documentation
This is done using the DATABASES setting. This setting maps database aliases, which are a way to refer to a specific database throughout...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rochacbruno Against what? My changes just use dynaconf directly and drop the Django integration. There is not really anything to patch with that regard in dynaconf itself…
Hi o/
By the way, I think @apollo13 had a good idea by getting dynaconf to load settings from within settings instead of patching entrypoints for this issue.
You can see the commit here: https://github.com/openstack/ara-server/commit/fdcc003fd9c9c05f1e0fcbaa502939f592503e79