Permalink
Browse files

Merge pull request #8 from Psycojoker/patch-1

give usefull informations when form validation fails + return 400 status code
  • Loading branch information...
2 parents 236bb0b + c99e547 commit 42dc407edde0fa1d63b8154478c9ca8fa370ba21 @af committed Sep 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 djangbone/views.py
View
@@ -188,4 +188,4 @@ def validation_error_response(self, form_errors):
can override this method is you want to use a specific error response format.
By default, the output is a simple text response.
"""
- return HttpResponse('ERROR: validation failed')
+ return HttpResponse('<p>ERROR: validation failed</p>' + str(form_errors), status=400)

0 comments on commit 42dc407

Please sign in to comment.