Replace# If delete is true (the default), the file is deleted as soon as it is closed. (New in version 2.6: The delete parameter.) [1]
self.tmpfile = tempfile.NamedTemporaryFile()
To
self.tmpfile = tempfile.NamedTemporaryFile(delete=False)
Reference: http://docs.python.org/2/library/tempfile.html#tempfile.NamedTemporaryFile
Download: https://github.com/shaunsephton/django-snippetscream
No comments :
Post a Comment