def render_to_kml(*args, **kwargs):
 return HttpResponse(loader.render_to_string(*args, **kwargs), content_type='application/vnd.google-earth.kml+xml')

def render_to_kml ( * args , ** kwargs ) : return HttpResponse ( loader . render_to_string ( * args , ** kwargs ) , content_type = 'application/vnd.google-earth.kml+xml' )
renders the response as kml .