Kimmo Hintikka Kimmo Hintikka - 12 days ago 5
Python Question

Difference between migrate and syncdb commands in django?

I was not able to find this is django.org, so is Django 1.7 supposed to create superuser in the first run automatically?

Last time I used Django it was 1.6.x and command to run was syncdb. Now command is migrate and it does not seem prompt you to create superuser.

I can easily fix this by running python manage.py createsuperuser, but is this a bug or working as intended as all the tutorial refer you to create user in the first run?

This is what migrate does when I run it.

Operations to perform:
Apply all migrations: admin, contenttypes, auth, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying sessions.0001_initial... OK


This is new
virtualenv
with just, Python 2.7, pip and Django 1.7

Answer

basically follows the same process as South (at least for the standard migration process) – it just simplifies things a bit.

enter image description here

After migration command run python manage.py createsuperuser command to create super user.

Read this also https://realpython.com/blog/python/django-migrations-a-primer/