S

Shyam Dubey • 3.70K Points
Extraordinary

Q. How do you check for POST request in a view?

  • (A) request.POST == True
  • (B) request.type == POST
  • (C) request.method == 'POST'
  • (D) request.is_post()
  • Correct Answer - Option(C)
  • Views: 7
  • Filed under category Django
  • Hashtags:

Explanation by: Shyam Dubey
request.method == 'POST' is the standard way to check POST requests.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.