Python Forum
HttpRequest vs HttpResponse in Django - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: HttpRequest vs HttpResponse in Django (/thread-23071.html)



HttpRequest vs HttpResponse in Django - ift38375 - Dec-10-2019

Httprequest.method attribute exists in Django but i do not know about HttpResponse.method attribute is exists or not ?


RE: HttpRequest vs HttpResponse in Django - Malt - Dec-10-2019

As far as I know, there is HttpResponse method in Django


RE: HttpRequest vs HttpResponse in Django - buran - Dec-10-2019

No, it does not. But why would you need it?
HttpResponse objects are your responsibility. Each view you write is responsible for instantiating, populating, and returning an HttpResponse. You will know the method used from the request

. https://docs.djangoproject.com/en/3.0/ref/request-response/#httpresponse-objects