Hello Marc,
You can render a template into an string.
from django.template.loader import render_to_string
my_template = render_to_string('template.html',{'some':'data'})
If you want to send the list of objects to the browser you can use
serialization into json:
http://docs.djangoproject.com/en/dev/topics/serialization/#id2
In other hand, i'm currently developing Dajax (
http://code.google.com/p/dajaxproject/) it will help you using ajax in
django. For example, for sending serialized objects to the browser and use
it as you want in JS.
Thanks
2009/6/2 Aldo <[email protected]>
>
> Hey,
>
> I have some ajax running on my pages.
>
> I want to have it pass back some objects. However, I am unsure if I
> can pass a list of objects back. So far I have only ever passed back
> raw xml or text. Can objects be passed and then iterated via the html
> template?
>
> Thanks
> >
>
--
neo2001[at]gmail.com
jorge[at]thecodefarm.com
neo[at]art-xtreme.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---