Article Directory
One, ORM creates model and mapping database
1. Create a model
ORM models are generally placed in the models.py file in the app directory , and each app can have its own model.
If the model is to be mapped to the database, the app must be INSTALLED_APPS
installed in settings.py .
The model established in models.py is as follows:
from datetime import datetime
from django.db import