Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print post request data in django

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

like image 402
Robot Avatar asked Nov 20 '18 06:11

Robot


1 Answers

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

like image 85
Antu Avatar answered Sep 29 '22 07:09

Antu