kml file output for google earth etc

This commit is contained in:
Martin Green
2023-05-01 00:01:41 +01:00
parent 2ee63a9804
commit 896af43994
4 changed files with 89 additions and 1 deletions

View File

@@ -615,3 +615,13 @@ def qm(request, cave_id, qm_id, year, grade=None, blockname=None):
"badslug": f"QM.DoesNotExist blockname is not empty string {cave_id=} {year=} {qm_id=} {grade=} {blockname=}"
},
)
def expo_kml(request):
return render(
request,
"expo.kml",
{
"entrances": Entrance.objects.all()
},
content_type = "application/vnd.google-earth.kml+xml"
)