#31969: 'database' option in conf file not working
-----------------------------------------+------------------------
Reporter: komaljeet | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I am assumimg this is a bug since as per docs, we should be able to use
'database' in conf file.
It its not a bug, please close the ticket.
https://docs.djangoproject.com/en/3.1/ref/databases/#mysql-notes
Putting 'database' in conf file does not work, exception raised is:
django.db.utils.InternalError: (1046, 'No database selected')
DB_CONF_PATH = /path/to/conf/file
[client]
database = xxxxx
host =xxxxx
user = xxxxxxx
password = xxxxxx
default-character-set = utf8
But putting it settings.DATABASES dict works.
{{{
DATABASES = {
'default': {
'ENGINE': 'mysql_cymysql',
'OPTIONS': {
'read_default_file': DB_CONF_PATH,
},
'NAME' : 'xxxxxx'
}
}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31969>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.8910fda51ffdeb927bc8d6596ef841cb%40djangoproject.com.