Requests
HttpRequest.REQUEST
Deprecated since Django 1.7
Removed since Django 1.9
For convenience, a dictionary-like object that searches
POSTfirst, thenGET. Inspired by PHP’s$_REQUESTFor example, if
GET = {"name": "john"}andPOST = {"age": '34'},REQUEST["name"]would be"john", andREQUEST["age"]would be"34"It’s strongly suggested that you use
GETandPOSTinstead ofREQUEST, because the former are more explicitSupport both
GETandPOSTparam = request.REQUEST.get('param', '') # Before Django 1.9 param = request.GET.get('param') or request.POST.get('param', '') # All Django Version