Commit 4a6cb387 authored by Luke Plant's avatar Luke Plant
Browse files

Cleaned up some test code.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15957 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 16f6acdb
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -21,17 +21,12 @@ def post_form_view(request):
    return post_form_response()

# Response/views used for template tag tests
def _token_template():
    return Template("{% csrf_token %}")

def _render_csrf_token_template(req):
    context = RequestContext(req, processors=[csrf])
    template = _token_template()
    return template.render(context)

def token_view(request):
    """A view that uses {% csrf_token %}"""
    return HttpResponse(_render_csrf_token_template(request))
    context = RequestContext(request, processors=[csrf])
    template = Template("{% csrf_token %}")
    return HttpResponse(template.render(context))

def non_token_view_using_request_processor(request):
    """