I am stuck on Django Documentation tutorial on displaying SQLite table.
" If you’re interested, run the command-line client for your database and type \dt (PostgreSQL), SHOW TABLES; (MySQL), or .schema (SQLite) to display the tables Django created. "
I have created a project named mysite. Location : C:\Python34\Scripts\mysite
Inside mysite
, there are mysite
folder, db.sqlite3
, and manage.py
.
I opened command prompt and navigate to C:\Python34\Scripts\mysite
and I type .schema
and it returns " . schema is not recognized.. "
My settings.py
database file :
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join('BASE_DIR' , 'db.sqlite3'),
}
}
I also can't define BASE_DIR. I don't know about the db.sqlite3
file. I cannot know if the file is .db extension.
Could someone help me to find out ?
Aucun commentaire:
Enregistrer un commentaire