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 = {}
                datetime_now = datetime.datetime.now()
                comment = errors and '' or manipulator.get_comment(new_data)
                response_dict.update({
                        'comment': comment,
                        'comment_form': forms.FormWrapper(manipulator, 
new_data, errors),
                        'options': options,
                        'target': target,
                        'hash': security_hash,
                        'success': True,
                        'year': datetime_now.year,
                        'month': datetime_now.strftime("%b"),
                        'day': datetime_now.day
                })
                if xhr:
                        return HttpResponse(simplejson.dumps(response_dict),
mimetype='application/javascript')
                else:
                        return render_to_response('comments/free_preview.html',
response_dict, context_instance=RequestContext(request))


Any clues?


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to