mjumbewu / django-jstemplate

Embed Javascript templates (mustache.js and more) into Django templates with minimal fuss.
Other
41 stars 16 forks source link

Don't use __file__ (Windows) #8

Closed debnet closed 9 years ago

debnet commented 10 years ago

Hello,

We had an issue with template loading on IIS for Windows and Python 3.4. file (in AppLoader and AppRegexLoader) returns an absolute path which is directly read by IIS and where path separators are "/" and not "\". The workaround is to use os.path.abspath( file ), we monkeypatch it for our deployment, and it works fine with NGinx and Apache too.

All the best.

mjumbewu commented 9 years ago

Hey @debnet, thanks for the tip. I don't often get much windows testing in. I think I hit all the instances of __file__ in commit 972fd484fe.