def render_to_kmz(*args, **kwargs):
 return HttpResponse(compress_kml(loader.render_to_string(*args, **kwargs)), mimetype='application/vnd.google-earth.kmz')

def render_to_kmz ( * args , ** kwargs ) : return HttpResponse ( compress_kml ( loader . render_to_string ( * args , ** kwargs ) ) , mimetype = 'application/vnd.google-earth.kmz' )
compresses the kml content and returns as kmz .