我得到了以下错误: assert not cls._meta.auto_field, ( AssertionError: Modelshop.Product can't have more than one auto-generated field) 下面是我的Product类代码: class Product(models.Model):
product_id = models.AutoField(primary_key=True)
大家好,我想写一个博客,我想关联一个用户来发帖..评论一下,这是一个多用户的博客,我不知道怎么做,有什么帮助吗?!#this is for categories title=models.CharField(max_length=100,defaultreturn self.titleclass Gigposter(models.Model):
use
我的嵌套序列化程序和ListAPIview的自动生成模式有问题。(many=True, read_only=True, source='slidedatadescription_set') model = SlideData/env/lib/python3.8/site-packages/rest_framework/generics.py", line 122, in