Reputation: 205
I'm starting the Django tutorials and have virtual environments and django installed. I'm working on a Mac 10.6.8, which has sqlite3 already installed.
I'm working inside a virtual environment. I changed the settings.py file to:
ENGINE -- 'django.db.backends.sqlite3'
I left the NAME
-- in the settings.py file blank (i.e. ''
) because the tutorial said
"If the file doesn't exist, it will automatically be created when you synchronize the database for the first time."
But when I run python manage.py syncdb
, I get the following error:
django.core.exceptions.ImproperlyConfigured: Please fill out the database NAME in the settings module before using the database.
Why isn't my file automatically created? Or what do I need to do to solve this problem?
Thank you!
Upvotes: 2
Views: 1373
Reputation: 53971
It will be created for you, but you have to specify what name to call it so just set NAME
to sqlite.db
or something similar. You can also specify a path so that it doesn't clog up your project directory. I usually save the dev database outside of my project.
Upvotes: 3