Wednesday, November 22, 2017

Re: Building a web app for use of third party python package

From what you have said, this is not too hard.

You need a basic view to handle the upload, which is in turn will make a call to the specialised method for processing of the file (and zip creation) before returning the result to the user.

A quick Google shows some relevant examples:

* https://simpleisbetterthancomplex.com/tutorial/2016/08/01/how-to-upload-files-with-django.html
* https://stackoverflow.com/questions/12881294/django-create-a-zip-of-multiple-files-and-make-it-downloadable

(Stack Overflow is, in general, a massive resource for Python/Django Q&A).

HTH


On Tuesday, 21 November 2017 15:49:46 UTC+2, Enikő Regényi wrote:
Hello,

I would like to use Django for building a web application for use of a third party python package. 

This third party package uses a text file as input, and produces a bunch of text files as output (sorted in directories). 

I would like my website to take text/textfile from the user, and give an archive (.zip) back with all the output files. 

I went through the tutorial on the django website already, and made some progress, but my understanding is still shallow for this project.

Could someone point me to the best direction, or give tips on what bits of the documentation I should read to get my head around it as fast as possible?


Many thanks!

Eni

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4991c517-723b-45b7-be89-5e02208f6d6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment