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() #
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
2 matches
Mail list logo