November 2015
Beginner to intermediate
840 pages
26h 30m
English
Migration generation, like most other interactions with Django, occurs thanks to the manage.py script.
Before actually generating a migration, run the check command, shown in Example 3.23. Django will warn you if there are any typos or problems with your models.
Example 3.23: Shell Code
$ ./manage.py check System check identified no issues (0 silenced).
Satisfied with the output of check, we can then run the makemigrations command. In Example 3.24, I run the command twice, specifying each app.
Example 3.24: Shell Code
$ ./manage.py makemigrations organizer Migrations for 'organizer': 0001_initial.py: - Create model NewsLink - Create model Startup ...
Read now
Unlock full access