After Django models.py increases, no corresponding tables are generated in MySQL database.

According to the tutorial, it was wrong to add and save quest.

1.models.pyThere is no mistake in naming it.

2.Check INSTALLED_APPS under mysite-> settiongs settings are correct.

 

3.Using Python manage.py makemigrations polls has no modified content.

4.Check 0001_***.py normal

Resolvent:

1.Delete all files except __init__.py under migrations.

2.python manage.py makemigrations polls

3.python manage.py migration

4.View database has generated corresponding table

 

Leave a Reply

Your email address will not be published. Required fields are marked *