Kimmo Hintikka Kimmo Hintikka - 10 months ago 74
Python Question

Difference between migrate and syncdb commands in django?

I was not able to find this is, 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 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
with just, Python 2.7, pip and Django 1.7

Answer Source

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 createsuperuser command to create super user.

Read this also