ehsan safir
ehsan safir

Reputation: 63

what is diffrent between WSGIRequest and django HttpRequest?

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

Answers (1)

AKX
AKX

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

Related Questions