#13610 closed (fixed)
Missing ENGINE setting in settings.py doesn't produce error
Reported by: | Jani Tiainen | Owned by: | Gregor Müllegger |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | settings config | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Given following database config:
DATABASES = { 'default' : { # 'ENGINE' : '', 'USER' : 'myuser', 'PASSWORD' : 'mypass', 'HOST' : '128.0.0.1', 'NAME' : 'mydb', 'PORT' : '5432', }, }
Doesn't produce helpful information, only:
$ ./manage.py syncdb Unknown command: 'syncdb' Type 'manage.py help' for usage.
./manage.py help
produces correct list of runnable commands.
Attachments (1)
Change History (6)
by , 15 years ago
Attachment: | 13610.patch added |
---|
comment:1 by , 15 years ago
Has patch: | set |
---|---|
Needs tests: | set |
Owner: | changed from | to
Status: | new → assigned |
Version: | 1.2 → SVN |
comment:2 by , 14 years ago
milestone: | → 1.3 |
---|---|
Needs tests: | unset |
Triage Stage: | Unreviewed → Ready for checkin |
This is one of those times when it is ok to skip having a test, and just eyeball it prior to checkin.
The patch as presented looks reasonable, so I'll mark it ready for checkin.
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 by , 14 years ago
Note:
See TracTickets
for help on using tickets.
I added a patch but it doesn't contain a test because I'm unsure how to test this issue.
The syncdb command calls the django.db.init module which raises an KeyError if no ENGINE is set. But this error is catched in django/core/management/init__.py:258 so I also changed this file and moved some code out of the except clause to make spotting issues in management commands easier.