def render_to_kml(*args, **kwargs):
    return HttpResponse(loader.render_to_string(*args, **kwargs),
        content_type='application/vnd.google-earth.kml+xml')
From http://www.wordaligned.org/articles/zippy-triples-served-with-python
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/gis/shortcuts.py/render_to_kml--crossover with--dataset/ETHPy150Open agiliq/django-socialnews/socialnews/mptt/utils.py/previous_current_next