We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have one model with a field which is self related,
class zi(models.Model): """汉字数据模型""" chszi = models.CharField(max_length=1, null=False, blank=False, verbose_name="汉字", unique=True) relatedzi = models.ManyToManyField("self", null=True, blank=True, related_name="rzi", symmetrical=True, verbose_name='关联字') class RelatedZiSerializer(serializers.ModelSerializer): """关联汉字的序列化""" class Meta: model = zi fields = ['id', 'chszi'] class ziDetialSerializer(WritableNestedModelSerializer, serializers.ModelSerializer): """汉字详情的序列化""" relatedzi = RelatedZiSerializer(many=True)
with code above, send a put request to update it, but with error showed below:
how to solve this problem?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have one model with a field which is self related,
with code above, send a put request to update it, but with error showed below:
how to solve this problem?
The text was updated successfully, but these errors were encountered: