Serving static files on heroku

0 votes
I'm creating a Python app for heroku. Flask is used for the web component of the app.

But the problem is that I can't find a way to serve static files. I don't want to do it through flask because that is very inefficient.

I'm also using gunicorn. How would I set up serving of static files?
Jun 13 in Python by ana1504.k
• 6,830 points
21 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Try using Amazon s3 for storing static and media files. Here is heroku's documentation of using s3. Then you might want to disable automatic collectstatic instructions here so collectstatic isn't run every time you push to heroku. Hope this helps.

answered Jun 13 by SDeb
• 11,080 points

Related Questions In Python

0 votes
1 answer

When I create and remove files rapidly on windows using python I get WindowsError (Error 5)

Here's the short answer: disable any antivirus or ...READ MORE

answered Aug 31, 2018 in Python by charlie_brown
• 7,710 points
79 views
0 votes
1 answer
0 votes
1 answer

How can I rename files on the fly using Python?

You could simply use a wrapper object ...READ MORE

answered Sep 7, 2018 in Python by ariaholic
• 7,320 points
30 views
0 votes
0 answers

How to mix read() and write() on Python files in Windows

It appears that a write() immediately following a read() on a ...READ MORE

Oct 23, 2018 in Python by Aryya
• 500 points
26 views
0 votes
1 answer

Avoid killing children when parent process is killed

I would recommend against your design as ...READ MORE

answered Sep 7, 2018 in Python by Priyaj
• 56,140 points
293 views
0 votes
1 answer

Avoid killing children when parent process is killed

I would recommend against your design as ...READ MORE

answered Sep 14, 2018 in Python by Priyaj
• 56,140 points
35 views
0 votes
1 answer

Interactive Ipython Notebooks on Heroku

From what I understand, you have 2 ...READ MORE

answered Apr 11 in Python by SDeb
• 11,080 points
24 views
0 votes
1 answer

Which IDE can be used for Python on Mac OS X

Have tried many different (Kate, Eclipse, Scite, ...READ MORE

answered Oct 15, 2018 in Python by SDeb
• 11,080 points
42 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.