diff --git a/common/djangoapps/util/views.py b/common/djangoapps/util/views.py index 8b9dd5a9c1..0ccdd03301 100644 --- a/common/djangoapps/util/views.py +++ b/common/djangoapps/util/views.py @@ -95,4 +95,27 @@ def accepts(request, media_type): def debug_request(request): """Return a pretty printed version of the request""" - return HttpResponse("
{0}
".format(pprint.pformat(request))) + + return HttpResponse(""" +

request:

+
{0}
+ +

request.GET

: + +
{1}
+ +

request.POST

: +
{2}
+ +

request.REQUEST

: +
{3}
+ + + + +""".format( + pprint.pformat(request), + pprint.pformat(dict(request.GET)), + pprint.pformat(dict(request.POST)), + pprint.pformat(dict(request.REQUEST)), + ))