What are the problems with loading CSS and JS from Django to IIS7?

后端 未结 3 1161
予麋鹿
予麋鹿 2020-12-21 06:23

I successfully deployed my Django site to IIS7 but I still have problems about how to configure IIS to serve the static files. I tried many many things from the internet but

3条回答
  •  旧巷少年郎
    2020-12-21 06:31

    If you are using django >= 1.3 and following the doc you are probably using the 'staticfiles' app.

    1. First, you must configure your II7 to serve static files from the chosen path, by default URL: /static/ and PATH /staticfiles/ (I have no experience with II7 but the conf should be straightforward)
    2. Then run ./manage.py collectstatic to move the static files into the correct path

    and you should be done...

    More info on production settings here.

提交回复
热议问题