Django Fundamentals
Run & Write MigrationsEasyWrite Code
3/10
makemigrations / migrate

Description

After defining your `Post` model, create and apply the database migrations. Also write a custom data migration that creates a default admin user.

Requirements

01Show the commands to create and apply migrations
02Write a custom migration function using `RunPython`
03The function should create a superuser with username 'admin'
Python 3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Ln 18, Col 1