If your configuration is not mysql, Django will use sqlite by default, and when you run the above command, a sqlite database file will be generated in the project directory.
If the configuration is correct and it is mysql, after running your script, the corresponding table will be generated in the corresponding mysql database. The default table name is <app_name>_<model_name>
If you still have questions, please refer to: https://docs.djangoproject.co...
There are several situations when this situation occurs: 1. The db configuration in django settings.py is incorrect 2. There may be a problem with the db model writing There may be other situations
A little suggestion: Show the results of executing the python manage.py migrate command, so that others can help you quickly analyze, locate and solve the problem.
First you need to check your settings.py configuration, where:
If your configuration is not mysql, Django will use sqlite by default, and when you run the above command, a sqlite database file will be generated in the project directory.
If the configuration is correct and it is mysql, after running your script, the corresponding table will be generated in the corresponding mysql database. The default table name is <app_name>_<model_name>
If you still have questions, please refer to:
https://docs.djangoproject.co...
There are several situations when this situation occurs:
1. The db configuration in django settings.py is incorrect
2. There may be a problem with the db model writing
There may be other situations
A little suggestion: Show the results of executing the python manage.py migrate command, so that others can help you quickly analyze, locate and solve the problem.