Well I got it to work by what you said. Here is my example for those
that might come across this thread:
if errors or request.POST.has_key('preview'):
response_dict = {}
datetime_now = datetime.datetime.now()
comment = errors and '' or mani
Funny, I literally just finished debugging the same error.If you inspect the traceback you should see which dict element wouldn't serialize. Just walk up the traceback stack and inspect the locals. The bottom couple of stack frames will be within the JSON default handler (which generates the ever s
I get a pop-up error saying "internal server error" - which my
javascript is handling and displaying.
The full error in the page returned is:
Exception Type:
TypeError
Exception Value:
t: t... is not JSON serializable
Exception Location:
/usr/lib/python2.4/site-packages/django/utils/simplejson
What specifically does the error message say is not JSON serializable?
Try setting it to be a string in the response dict...
For example:
if errors or request.POST.has_key('preview'):
response_dict = {}
# datetime_now = datetime.datetime.now()
I am trying to send back the free comments form so I can process it
with ajax, and I am getting "is not JSON serializable" all the time.
I have copied post_free_comment and then I have simply done
if errors or request.POST.has_key('preview'):
response_dict = {}
5 matches
Mail list logo