Python Forum

Full Version: HttpRequest vs HttpResponse in Django
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Httprequest.method attribute exists in Django but i do not know about HttpResponse.method attribute is exists or not ?
As far as I know, there is HttpResponse method in Django
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/re...se-objects