Reputation: 63
in django view ,I check the type of request : it shows <class 'django.core.handlers.wsgi.WSGIRequest'>
def simpleview(request):
print(type(request))
output: <class 'django.core.handlers.wsgi.WSGIRequest'>
but in django documenttion but django has documented HttpRequest what is the diffrent beetween these two ?
Upvotes: 5
Views: 4117
Reputation: 169075
Not an awful lot.
One is a base class for all HTTP requests, one is specific for the WSGI protocol that application servers use to talk with Django, and it derives from HttpRequest.
Upvotes: 6