Django Bug Hunt Easy +10 XP
Missing Migration
Model changes aren't reflected in the database.
DjangoFind the bug
1
# After adding a new field to models.py2
# Changes not in database yet The bug is on line 1
Select the correct fix
Show answer and explanation
Answer: Run makemigrations then migrate
Django changes need two steps: makemigrations creates migration files, migrate applies them to the database.
Hint: Django tracks schema changes as migration files.
What this challenge tests
Bug Hunt in Django: migrations, models.