2012/4/21 David MENTRE <[email protected]>:
> Is there a proper way to tell Django that the four values should be
> valid float numbers?

In fact, Django assigns None to the variable when the value is not a float.

> My current approach would be to catch the "TypeError" exception and
> return HttpResponseBadRequest("ERROR: Invalid arguments") in that
> case. Does it seem correct to you? Any suggestion to fix this issue in
> a more Django-ic or Pythonic way?

I have added a check against None for the four coordinates, returning
HttpResponseBadRequest in case of error.

Patches sent to the list.

Best regards,
d.

Reply via email to