在“Package Manager Console”中执行update-database命令,出现异常信息: Introducing FOREIGN KEY constraint 'FK_dbo.Processes_dbo.Models_ModelId' on table 'Processes' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or mo…
一.models.py中 from django.db import models class UserModel(models.Model) user_name = models.CharField() class MyModel(models.Model) author = models.Foreignkey(user) age = models.CharField() 二. 序列化文件 serializers.py 中创建序列化类 from rest_framework.serialize…