【发布时间】:2019-07-07 16:35:37
【问题描述】:
我正在使用 graphene-django,我想创建四个接口,每个接口代表 Django 中的模型,我将从一个模型开始:
class TestInterface(graphene.Interface):
items = graphene.Field(models.Test)
但我不断收到此错误:
AttributeError: type object 'Test' has no attribute 'name'
有什么想法吗?
【问题讨论】:
标签: python django graphql graphene-python