joestump / django-ajax

A simple framework for creating AJAX endpoints in Django.
http://github.com/joestump/django-ajax
BSD 3-Clause "New" or "Revised" License
260 stars 53 forks source link

AJAXError can not be JSON encoded. #13

Closed ashchristopher closed 13 years ago

ashchristopher commented 13 years ago

If data is an AJAXError return the response generated by the error since the DjangoJSONEncoder does not encode objects.

This fixes issue #12 that I reported.

joestump commented 13 years ago

BTW, I added a slight tweak in json_response that will allow you to return AJAXError now. I also fixed the documentation.