This instruction should be used by testers ,inspectdb, But the point is , I may not just link to a database , Database needs to be specified .
python manage.py inspectdb --database [settings Database configured in key] > models Specific path
in addition ,django Automatically generated comments , It's also very important
# This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table # Feel free to rename the models, but don't rename db_table values or field names.
Summarized below :