Static files on OpenShift Django

前端 未结 5 1688
悲&欢浪女
悲&欢浪女 2020-12-16 06:59

I\'m having issues serving up static files - i.e. style sheets and images required from my html pages. I cannot seem to fathom why these static images are not being found. H

5条回答
  •  甜味超标
    2020-12-16 07:19

    I spent a long time trying to get static files working on Openshift. Following this blog post I set up my Django project using the standard project layout but static files would not work. I think the vhost config that they use is not setup to look for files in /static/. This question Serving Django static files in OpenShift seems to suggest if you use the old layout and use wsgi/static it will work. In the end I installed django-storages and served my static files from s3.

提交回复
热议问题