#18545: Improve the error message when the implicit settings configuration fails
-------------------------------+--------------------
Reporter: ncoghlan | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.4
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Currently, the fairly generic ImportError message received when the
implicit settings configuration fails has a couple of problems:
- it doesn't mention the possibility of using
django.conf.settings.configure(). The current error message suggests that
an environment variable pointing to a module is the only configuration
mechanism Django supports.
- it doesn't mention *which setting* was being looked up when the implicit
load failed
These combine to prevent someone that wants to use Django as a library
from *incrementally* working out the minimum configuration they need to
provide. Instead, they just get told "you need to provide some settings,
but we're not going to give you any hints as to what settings are needed
for the operations you're trying to use".
Adjusting the way the lazy initialisation is performed would go a long
towards making django usable as a library - I could just start importing
things, see what settings get accessed, look up those individual settings
and provide appropriate values in a django.conf.settings.configure() call.
With the current unhelpful error message, I have no idea where to even
start.
--
Ticket URL: <https://code.djangoproject.com/ticket/18545>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.