views.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:leodis-collections 作者: timwaters 项目源码 文件源码
def collection_geojson(request, collection_id):
  collection = get_object_or_404(Collection, pk=collection_id)
  photos = get_list_or_404(collection.photo_set.all())
  features = [f.get_geojson() for f in photos]
  d = {
      'type': 'FeatureCollection',
      'features': features
  }
  return JsonResponse(d)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号