syncing sqlite3 for Django tutorial

30 views
Skip to first unread message

Luisa Beck

unread,
Nov 21, 2012, 6:54:48 PM11/21/12
to django...@googlegroups.com

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!

Lee Hinde

unread,
Nov 21, 2012, 7:01:55 PM11/21/12
to django...@googlegroups.com
From the docs:


NAME -- The name of your database. If you're using SQLite, the database will be a file on your computer; in that case, NAME should be the full absolute path, including filename, of that file. If the file doesn't exist, it will automatically be created when you synchronize the database for the first time (see below).

What that means is that if the file with the name you provide doesn't exist it will be created. But you have to provide a name (and path.)
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/nzkQeK5eKf4J.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Reply all
Reply to author
Forward
0 new messages