json_response not giving auto true value

2 views
Skip to first unread message

Eric Sauer

unread,
Mar 4, 2010, 10:52:05 PM3/4/10
to dojango-users
Hi, I just went through this Dojango AJAX tutorial (http://uxebu.com/blog/2008/07/26/ajax-with-dojango/) and ended up getting a 500 error when I submitted valid data through a web form, unless I explicitly set the success value to true by replacing "ret = {}" with "ret = {'success':True}". I know its supposed to automatically set to True, so what could I be missing here?

klipstein

unread,
Mar 22, 2010, 3:33:04 PM3/22/10
to dojango-users
Hi Eric,

seems there is a bug in that blog-post. You have to set:

ret = {'success':True}

on line 4 of that example. Otherwise line 10 will fail. {success:True}
is just added in the json_response decorator after this function was
called and it wasn't set in the returned dictionary.

Regards, Tobias

Reply all
Reply to author
Forward
0 new messages