Graphene Django Integration的官方文档中的以下行正常工作:
from graphene_django import DjangoObjectType
然而,课程DjangoObjectType
在graphene_django.types
中定义,因为项目的source code可能会显示。
此外,在上述from
import inspect
print(inspect.getmodule(DjangoObjectType))
产生此输出:
<module 'graphene_django.types' from '<myVirtualEnv>/lib/site-packages/graphene_django/types.py'>
这怎么可能?