Django static files on heroku

后端 未结 5 1516
借酒劲吻你
借酒劲吻你 2020-12-05 05:09

I deployed a django app to heroku, using \"git push heroku master\" which worked absolutely fine.

I then created a second app on the same git using \"heroku create s

5条回答
  •  既然无缘
    2020-12-05 06:00

    Eventually solved this using the below in my urls file - from this question: Heroku - Handling static files in Django app

    from  import settings
    urlpatterns += patterns('',
            (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}),
        )
    

提交回复
热议问题