Python Forum
HttpRequest vs HttpResponse in Django
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HttpRequest vs HttpResponse in Django
#1
Httprequest.method attribute exists in Django but i do not know about HttpResponse.method attribute is exists or not ?
Reply
#2
As far as I know, there is HttpResponse method in Django
Reply
#3
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
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Django: How to automatically substitute a variable in the admin page at Django 1.11? m0ntecr1st0 3 3,318 Jun-30-2019, 12:21 AM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020