Can this be done without storing the image if it's only needed the one time?
On Wednesday, April 4, 2012 4:45:50 PM UTC-4, dancer` wrote:
>
> Thank you very much.
>
> One more thing - if I understand correctly this allows me to keep my data
> buffer clean and not worry about overwriting plots. I
The code I posted will create a temp file, them move it to uploads (not
static) using db.table.file.store(...) The store function will create a new
unique and secure filename in upoads. If you have no future plans to add
access control to these files, than you can put them in static. In that
ca
Thank you very much.
One more thing - if I understand correctly this allows me to keep my data
buffer clean and not worry about overwriting plots. Is it possible to use a
date/time unique naming format to automatically name the image files and
store them, say, in the static folder? Or somewher
Makes perfect sense.
When you use matplotlib you can do:
You can store the image in temp file:
import tempfile
f = tempfile.NamedTemporaryFile()
canvas = FigureCanvas(figure)
canvas.print_png(f)
filename = f.name
f.close()
then move it to the db in a field called for e
4 matches
Mail list logo