(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.
Patch from Alex Gaynor