Handle django sessions when doing file-operations

26 views
Skip to first unread message

sachin

unread,
Dec 4, 2013, 1:00:41 PM12/4/13
to django...@googlegroups.com
Hello guys,

Need your help again.

I m writing an app which does following file/dir operations:

1. Create a directory
2. Untar contents of some tarballs into it.
3. Do some more file operations like create a new file, open it for appending more text, finally cose it(file content varies upon per-user selection).
4. Now copy this file to that directory where I have extracted tarballs.
5. Finally make a tarball of that directory and serve it for download.

Extraction of tarballs and file-content is dependent on user. So every user may have his/her own selections.
Previously I have used "response['Content-Disposition']" but then I had a single file to operate on. But now the complexity has changed.
So when multiple users select different content the app crashes as it gets confused. All the operation mentioned above is done in the directory
called "temp" within the root of the project directory.

I need to handle this using django-sessions. I need some pointer/examples so that I can solve this issue.

More about this app: https://github.com/psachin/haqiba
Reply all
Reply to author
Forward
0 new messages