graphene django的gis扩展,定义标量、字段转换和其他有用的东西
django-graphene-gis-extension的Python项目详细描述
https://github.com/serioeseGmbH/django-graphene-gis-extension
django graphene gis扩展使用与gis相关的类型定义扩展django-graphene。 (即标量、字段转换等)。
快速启动
使用pip安装软件包:
pip install django-graphene-gis-extension
在已安装的应用程序设置中添加“严肃的Django服务”,如下所示:
INSTALLED_APPS = [ ... 'graphene_gis_extension', ]
在任何需要的地方使用标量和输入类型定义,例如在查询中:
from graphene_gis_extension.scalars import PointScalar from graphene_gis_extension.input_types import NearInputType class Query(graphene.ObjectType): thing_with_location = graphene.Field( ThingWithLocationType, exactly_at=graphene.Argument(PointScalar) near=graphene.Argument(NearInputType) )