MCPcopy
hub / github.com/django/django / render_to_kmz

Function render_to_kmz

django/contrib/gis/shortcuts.py:32–40  ·  view source on GitHub ↗

Compress the KML content and return as KMZ (using the correct MIME type).

(*args, **kwargs)

Source from the content-addressed store, hash-verified

30
31
32def render_to_kmz(*args, **kwargs):
33 """
34 Compress the KML content and return as KMZ (using the correct
35 MIME type).
36 """
37 return HttpResponse(
38 compress_kml(loader.render_to_string(*args, **kwargs)),
39 content_type="application/vnd.google-earth.kmz",
40 )

Callers 1

test_kmzMethod · 0.90

Calls 3

HttpResponseClass · 0.90
compress_kmlFunction · 0.85
render_to_stringMethod · 0.80

Tested by 1

test_kmzMethod · 0.72