19.9.2012 16:13, Philippe Raoult kirjoitti:
Hello all,

I'm using django templates to generate pdf listings in my app. After
running render() on the template, reportlab is called to create the pdf.

My issue is that those listings can get quite big (hundreds of pages,
with images) and thus take very long to render. Reportlab has progress
callbacks that allow me to have a nice progress bar on screen, but the
template rendering doesn't seem to offer this functionality. Has anyone
managed to implement this or has any suggestion regarding this topic ?

Regards,
Philippe

--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/kc5IlCznZ1wJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.

You need to push your rendering task as "external" job. Celery is very good at it and it does integrate with Django very well.

Basic idea is that you have view that starts the task and returns you the progress view that is either refreshed by using meta-tag or quite common ajax-approach to poll a view that returns progress value. And of course some view to actually fetch the result.

But there is nothing in template engine that can offer this kind of features since it's property of HTTP protocol and how request/response cycle goes.

--
Jani Tiainen

- Well planned is half done and a half done has been sufficient before...

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to