Re: What's the best way to save generated images?

2012-09-25 Thread JC Briar
Okay, this may not be the most efficient implementation, but it works: # create temporary file tmpfile = tempfile.TemporaryFile() *write to tmpfile* # wrap temporary file with django.core.files.File fileContents = django.core.files.File(tmpfile) fileContents.size = tmpfile.tell() #

What's the best way to save generated images?

2012-09-21 Thread JC Briar
I'm writing an app that will generate, store, and display chart images. The idea is this: When a site visitor requests a given chart image, the app will check to see if it already exists. If not, the app will generate and store the necessary image before displaying it. Towards that end, I have