(request, code)
return type('Response%d' % code, (HttpResponse, ), {'status_code': code})()
Responds to the request with the given response code.
    If ``next`` is in the form, it will redirect instead.
Responds to the request with the given response code.
    If ``next`` is in the form, it will redirect instead.
Responds to the request with the given response code . If next is in the form it will redirect instead .
def respond(request, code):
    """
    Responds to the request with the given response code.
    If ``next`` is in the form, it will redirect instead.
    """
    redirect = request.GET.get('next', request.POST.get('next'))
    if redirect:
        return HttpResponseRedirect(redirect)
    return type('Response%d' % code, (HttpResponse, ), {'status_code': code})()
def respond ( request , code ) : redirect = request . GET . get ( 'next' , request . POST . get ( 'next' ) ) if redirect : return HttpResponseRedirect ( redirect ) return type ( 'Response%d' % code , ( HttpResponse , ) , { 'status_code' : code } ) ( )