6

In PHP when I send post request data from template form to controller I can use print_r($data) to print form send data for debugging purpose but in Django how can I print post request form data in view.py

Robot
  • 135
  • 1
  • 1
  • 6

1 Answers1

17

If you get your form data like PHP you may use

from django.http import HttpResponse

return HttpResponse(request.POST.items())

And for more debuging follow this Link

Antu
  • 2,197
  • 3
  • 25
  • 40