title: type str doesn't define __round__ method/how to grab form fields ? django and cropper.js?
body: <p>I have a Django form where users would upload images and sometimes crop only parts from it so I used cropper javascript to grab the coordinates but the problem is the data received is treated as strings </p>
  
  <p>here's how i grab data of the form</p>
  
  <pre><code>  /* SCRIPT TO COLLECT THE DATA AND POST TO THE SERVER */
    $(".js-crop-and-upload").click(function () {
      var cropData = $image.cropper("getData");
      $("#id_x").val(cropData["x"]);
      $("#id_y").val(cropData["y"]);
      $("#id_height").val(cropData["height"]);
      $("#id_width").val(cropData["width"]);
      $("#formUpload").submit();
    });
  </code></pre>
  
  <h1>Forms.py</h1>
  
  <pre><code>class ImageForm(ModelForm):
      x = forms.FloatField(widget=forms.HiddenInput())
      y = forms.FloatField(widget=forms.HiddenInput())
      width = forms.FloatField(widget=forms.HiddenInput())
      height = forms.FloatField(widget=forms.HiddenInput())
  
      class Meta:
          model = UploadedImages
          fields = ('pre_analysed', 'x', 'y', 'width', 'height', )
  </code></pre>
  
  <p>and this is how i get the data from the form</p>
  
  <pre><code>if form.is_valid():
     image = form.save(commit=False)
     x = request.POST.get('x')
     y = request.POST.get('y')
     w = request.POST.get('width')
     h = request.POST.get('height')
  </code></pre>
  
  <p>but it always returns this error</p>
  
  <blockquote>
    <p>type str doesn't define <strong>round</strong> method</p>
  </blockquote>
  
  <p>so what i get is that I'm grabbing the data as strings instead of floats as it's saved in the form feild so how can i grab the data right ?</p>