from django.template import RequestContext
from django.template.loader import TemplateDoesNotExist
from django.http import Http404
from django.views.decorators.csrf import csrf_protect
from django.shortcuts import render_to_response


def staticflatpage(request, path):
    """Load/render a template corresponding to the path (a URL)"""
    # Don't render a base.html template.
    if path.replace("/", '').lower() == "base":
        raise Http404

    if not path.startswith('/'):
        path = "/{0}".format(path)
    if path.endswith('/'):
        path = path[:-1]

    # paths should be in the format: staticflatpages/path/from/url.html
    path = "staticflatpages{0}.html".format(path)
    try:
        return render(request, path)
    except TemplateDoesNotExist:
        raise Http404


@csrf_protect
def render(request, path):
    return render_to_response(path, {},
        context_instance=RequestContext(request))

@@ -1,47 +1,4 @@
-from django.template import RequestContext%0A
 from
@@ -85,62 +85,8 @@
 404%0A
-from django.views.decorators.csrf import csrf_protect%0A
 from
@@ -116,28 +116,16 @@
 t render
-_to_response
 %0A%0A%0Adef s
@@ -682,136 +682,4 @@
 04%0A%0A
-%0A@csrf_protect%0Adef render(request, path):%0A    return render_to_response(path, %7B%7D,%0A        context_instance=RequestContext(request))%0A

Use django shortcut render