I use django. Placed application on heroku. Set up to save on Amazon

here I send form

here I get my q.docx

Photo 1: The xlsx loaded into the form is successfully sent to Amazon)

Photo 2> 1: I want the same thing with the generated docx file. But it saves it in the media's temporary folder on heroku

If you specify the absolute path 'path = settings.MEDIA_URL + q.name ...' In photo 2, this does not work. After all, indicates the relative

Help advice. thank

PS The function 'create_docx ()' cannot return 'doc'. I get the error 'Document () file not __committed ()'

  • Here questions are asked in Russian - Sublihim
  • @Sublihim corrected) - Ruslan Stanevich
  • Do not use images for code. Edit your question and add code as formatted text. - jfs

0