Hello django community,
I am currently developing my first web application. Since I am new to
web development, I thought I should seek advice on what I am trying to
implement at the moment.
Before I start, here are my questions: *can django do this?**if not, is
there a python library that can do this? if not, am I doing it right?*
I want to dynamically create a temporary odt file and upload it to the
client. The file is dynamically created based on GET request parameters.
It basically searches the database and fills the odt file with
information. This file is temporary and should be deleted after the
upload finishes.
Here is how I am planning to do it. The view function creates the file
and fills it with information. The file is created in a directory which
is added to the STATICFILES_DIRS. The view then redirects to the file
url and the client downloads the file.
To delete the files, I am planning to create a class that handles
temporary file creation and deletion. The class forces an upper limit to
temporary files number, say 10. Any file created after 10 files will
make the class delete older files based on modification time. I might as
well create a thread that would delete files regularly but it would be a
bit more complicated and unnecessary for this specific project.
Thank you,
Mohammad
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/53CD2D1F.8080102%40gmail.com.
For more options, visit https://groups.google.com/d/optout.