1

I successfully integrated django in IIS 7.5 (server loads django1.6.5 using python2.7) but it doesn't load static files(CSS, JS), when I run manage.py runserver static files were loaded though. Am I missing something. I followed this tutorial in YouTube https://www.youtube.com/watch?v=kXbfHtAvubc. Thanks!

user3204806
  • 322
  • 4
  • 15
  • Did you run python manage.py collectstatic? Are the files not getting put where you expect or is IIS just not sharing them – Foon Jun 22 '14 at 23:39
  • @Foon i'd run collectstatic but still not working, do i have to setup something on iis? – user3204806 Jun 22 '14 at 23:53
  • I haven't used IIS with Django; with apache, you generally do have some configuring although it can be as simple as defining your static root within the apache html directory (/var/www/html by default on at least Redhat systems) and then fixing permissions. Is your IIS hosting a static html directory? – Foon Jun 23 '14 at 00:24

1 Answers1

0

That video works great on my static file serving. Here is my environment: Python 2.7 Django 1.7 on Windows Server IIS 7.5

If you stick on steps, there shouldn't be any problem. Make sure you remove "Django Handler" in staticapp which is @ 17:51 on that video. And check whether there is a static file handler in handler mappings. After you check your steps and make sure everything is right, you may try another way below to serve static file.


You may add a virtual directory to serve static file. [How to fetch static CSS files with django on IIS?

Community
  • 1
  • 1
Yiqing Lan
  • 101
  • 1
  • 3