Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the SQLite database created automatically by django?

I am doing settings.py file in the django tutorial and I am confused what I put into the NAME field. I want to use SQLite, so my understanding is that I don't need to create anything and the database will be created automatically? If so, where will it be created and what will it be called?

I tried running manage.py syncdb and got: "django.core.exceptions.ImproperlyConfigured: Please fill out the database NAME in the settings module before using the database."

So I am guessing I should fill in the NAME file, but this is not what I understood in the directions below:

https://docs.djangoproject.com/en/1.3/intro/tutorial01/

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).

like image 701
Eric Strobel Avatar asked Sep 11 '11 23:09

Eric Strobel


1 Answers

Well, as it says in the documentation, it will create the SQLite3 database file at the file location you configure at NAME. Django doesn't guess but uses the file path you specify there.

Only if you use something other than SQLite, the NAME will be the actual database name on the database server.

like image 89
Holger Just Avatar answered Sep 25 '22 18:09

Holger Just