Hello to all,

I have some charts created with matplotlib and I would like to include them 
in my Django application.

What is the considered best practices in order to do that?

I'm considering processing the data and generating PNG files in "temporary" 
locations, so I when the chart file is created I just need to refer to it 
in the template.

This could create a problem because I would need to remove the chart file 
after a while, or even better, when the user logs out of the application. I 
did a quickly search in this group archive and couldn't find anything close 
related to this. It doesn't look simple to execute any kind of task when 
the user logs out (signals?) and there is a the risk of users just closing 
their browsers (which will require that I use crontab or something like it 
to delete old files).

Another possibility is to just open a new browser window and include in the 
response only the image itself.

Is there any better way to implement that?

Thanks!

Alceu

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c39224bb-09b9-4f44-bdbc-286a945b4e48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to