def respond(template, context={}, request=None, **kwargs):
from django.http import HttpResponse<EOL>from django.template import RequestContext<EOL>from django.template.loader import render_to_string    <EOL>if request:<EOL><INDENT>default = context_processors.default(request)<EOL>default.update(context)<EOL><DEDENT>else:<EOL><INDENT>default = context.copy()<EOL><DEDENT>rendered = render_to_string(template, default, context_instance=request and RequestContext(request) or None)<EOL>return HttpResponse(rendered, **kwargs)<EOL>
Calls render_to_response with a RequestConext