#12428 closed (fixed)
Projects created with django-admin.py startproject no longer run if no databases have been configured
Description ¶
(ve)simon $ ./manage.py runserver 0.0.0.0:8003 Validating models... Unhandled exception in thread started by <function inner_run at 0x1363c30> Traceback (most recent call last): File "/Users/simon/Development/django_signed_demo/ve/lib/python2.6/site-packages/django/core/management/commands/runserver.py", line 48, in inner_run self.validate(display_num_errors=True) File "/Users/simon/Development/django_signed_demo/ve/lib/python2.6/site-packages/django/core/management/base.py", line 249, in validate num_errors = get_validation_errors(s, app) File "/Users/simon/Development/django_signed_demo/ve/lib/python2.6/site-packages/django/core/management/validation.py", line 22, in get_validation_errors from django.db import models, connection File "/Users/simon/Development/django_signed_demo/ve/lib/python2.6/site-packages/django/db/__init__.py", line 74, in <module> connection = connections[DEFAULT_DB_ALIAS] File "/Users/simon/Development/django_signed_demo/ve/lib/python2.6/site-packages/django/db/utils.py", line 73, in __getitem__ backend = load_backend(db['ENGINE']) File "/Users/simon/Development/django_signed_demo/ve/lib/python2.6/site-packages/django/db/utils.py", line 20, in load_backend return import_module('.base', backend_name) File "/Users/simon/Development/django_signed_demo/ve/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) ValueError: Empty module name
The problem is that "django-admin.py startproject" creates a new project with the following in the settings file:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', ...
Django then chokes on the invalid ENGINE setting.
Brand new projects should work without needing the database to be manually configured, since some projects don't use a database at all.
Change History (5)
by , 15 years ago
Attachment: | 12428.diff added |
---|
comment:1 by , 15 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
comment:2 by , 15 years ago
Summary: | Project's created with django-admin.py startproject no longer run if no databases have been configured → Projects created with django-admin.py startproject no longer run if no databases have been configured |
---|
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Patch from Alex Gaynor