In my python code in views.py, I created a list of object instances. For example, if one of my objects in models.py is Sentence, then I have a list of sentences at one point:
sentenceList = [Sentence1,Sentence2,...,SentenceN]
I enjoyed using the template language in Django to send it to a template where I can scroll through sentences in a template, but now I am implementing some AJAX functions and would like to send something similar to this listList via serialization through the AJAX portal.
It seems that I'm between two worlds here: regular python JSON seiralizer, which serializes lists and a python object, and simplejson, which deals only with pure Django Model requests.
Does anyone have a suggestion on how I should deal with this (including not using lists of instances of objects, if for some reason this is not a good form)?
Thanks!
-Andrew
source share