peterbe / django-static

Template tags for better serving static files from templates in Django
BSD 2-Clause "Simplified" License
193 stars 28 forks source link

django-static mixing up urls and system file paths for windows machine. #26

Open akamad opened 12 years ago

akamad commented 12 years ago

While using django-static on windows machine I found that the new filenames that were being created had a "\" instead of a "/" in their src. eg.href="/media/css\login_foo_moo_too.css"

instead of href="/media/css/login_foo_moo_too.css"

This issue was happening because on the windows machine django-static was mixing the system path of the file and the url associated with it.

GeraldXv commented 9 years ago

Add this after line 551: this_filename = os.path.normpath(this_filename).replace('\\','/')