What Are The Problems With Loading Css And Js From Django To Iis7?
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 nothin
Solution 1:
Right click on your website in IIS7 manager and
- add a virtual directory
- name it with the same name of your folder you want IIS to handle. lets say static
- add the path to your real static folder in your application mine was in myproject/static then ok
and here you go :)
Solution 2:
If you are using django >= 1.3 and following the doc you are probably using the 'staticfiles' app.
- 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) - 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.
Solution 3:
You also need to insert a web.config file into the static directory for IIS to serve the files.
Post a Comment for "What Are The Problems With Loading Css And Js From Django To Iis7?"