November 2015
Beginner to intermediate
840 pages
26h 30m
English
The command to run the code in the migrations files, colloquially called applying a migration, is migrate. If you’ve been following closely, you already used the command in Chapter 1, before we used the runserver command. Calling the command created a default SQLite database, which Django requires to run on a server.
Regardless of whether you already have a database, you will now call migrate again, as in Example 3.33.
Example 3.33: Shell Code
$ ./manage.py migrate
If you don’t already have a database, Django will create one named db.sqlite3, as specified on line 64 of /suorganizer/settings.py. Django will also produce the output shown in Example 3.34.
Example 3.34: Shell Code
Read now
Unlock full access