When changing models in Django, there are cases where you want to delete all the data inside.
python manage.py shell
After logging in to the shell with
from * import models.table
table.objects.all().delete()
python manage.py dbshell
After logging in to dbshell with, issue `` `TRUNCATE TABLE```
Recommended Posts