Back

Explore Courses Blog Tutorials Interview Questions

Explore Tech Questions and Answers

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

0 votes
2 views
by (19.9k points)

I am reading a book ("Learning Django Web Development" by Sanjeev Jaiswal and Ratan Kumar) on Django, but the book is based on an earlier version of Django (prior to version 1.9). In order to populate the database with tables, the book uses the syncdb command:

$ python manage.py syncdb

Then the book says that terminal will prompt you to create a superuser account.

the syncdb command is no longer used in Django version 1.9 and up. After some research, it seems as if the migrate command populates the databse with tables, but it does not prompt the creation of a superuser account. How can I do this in Django 1.9.6?

1 Answer

0 votes
by (25.1k points)

I think you want to run these commands:

python manage.py makemigrations creates migration files based on your models

python manage.py migrate will create the tables in your db based on the migration files created

python manage.py createsuperuser will create a superuser for your application in the database

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...