NetAngels / django-webodt

django module to create MS Word, PDF and other types of documents from ODF and HTML templates
http://packages.python.org/django-webodt/
93 stars 52 forks source link

Feature request: Set location of temporary files #2

Closed mattaustin closed 13 years ago

mattaustin commented 13 years ago

I would like to protect the pdfs which django-webodt produces as much as possible, and would therefore prefer for the temporary files to be placed in a directory with permissions for the current user only. Although there is an option for WEBODT_CACHE_DIR, I still see files are created directly in /tmp before they are closed.

Fantastic project - has been a great use to me!

imankulov commented 13 years ago

Matt, thanks for the feedback. I should point out that temporary files are created with tempfile.mkstemp() which is pretty safe. Nobody except the owner can delete these files or read their contents. Nonetheless, we have added yet another option WEBODT_TMP_DIR. With this variable you can redefine the name of the directory to store temp files. I hope this option is what helps you.