Thursday, March 30, 2017

Ajax Call is sending empty request.POST or request.body

Hi i am still not clear when using request.POST or request.body.

Anyway this ajax call is sending emprty request.POST, or empty  request.body:

    <script type="text/javascript">

            var check = $('#id_check').val();
                type: "POST", 
                url: "./captcha",
                contentType: "application/json",
                dataType: "json",
                success: function(data) {
                error: function(data) {

<form id ="captcha_form" class="captcha_form" action="./captcha" method="post">{% csrf_token %}
<input type="submit" id="button" class="button" value="Invio"/>

class check_box_form(forms.Form):
    scelte = [('Yes','Yes'),('No','No')]
    check = forms.ChoiceField(label='I am a Robot       ',choices=scelte)

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment