GET and POST
request.method tells how the page was requested.
Example
def contact(request):
if request.method == "POST":
name = request.POST["name"]
return HttpResponse(name)
return HttpResponse("form")Exercise
Check method.
request. == "POST"
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.