Article directory
1. Problem description
Mysql was reinstalled a few days ago, and the content in django was deleted.
Executing python manage.py runserver will definitely not run properly. So the key is to reply to the database.
2. Solution
Django is really a very good framework, it can generate database structure with one click.
Just use python manage.py migrate
it.
But it may prompt you with the error content.
Just create a new Django database in MySQL, and then Django will create tables based on the model you wrote.
Execute it again python manage.py migrate
and it will be successful.