elweb


Django Static Files on Heroku

by Giovanni Collazo. Average Reading Time: less than a minute.

It’s a fact. Heroku is a great solution for Python web developers. They are the best and truly polyglot hosting solution for web apps. The only thing that took me a while to get working with my Django apps was the static files. I started using S3 as my backend but preferred a simpler solution for very small projects.

I searched around and found a very simple solution.

Just add the collectstatic command to the Procfile.


  • Guillermo Siliceo

    For newbies, the idea is to have this line of code on the Procfile file.

  • Asdad

    Hi. Do I have to replace this line:

    web: python hellodjango/manage.py run_gunicorn -b “0.0.0.0:$PORT” -w 3
    Or just append it to the Procfile?

    Thanks!