Google News
logo
Django - Interview Questions
How do you connect your Django project to the database?
Django comes with a default database which is SQLite. To connect your project to this database, use the following commands :
 
* python manage.py migrate (migrate command looks at the INSTALLED_APPS settings and creates database tables accordingly)
* python manage.py makemigrations (tells Django you have created/ changed your models)
* python manage.py sqlmigrate (sqlmigrate takes the migration names and returns their SQL)
Advertisement