noirbizarre / django.js

Javascript tools for Django
http://djangojs.readthedocs.org/en/latest/
GNU Lesser General Public License v3.0
181 stars 81 forks source link

Support script prefix (subpaths) #34

Closed ebrelsford closed 10 years ago

ebrelsford commented 10 years ago

It would be great if the URLs in init.js could be prefixed by the SCRIPT_NAME header, which facilitates running projects on a subpath (eg http://example.com/myproject/).

Otherwise it looks like you have to manually add the prefix. Or is there a better way I'm not seeing?

Any guidance on doing this? Would be glad to give it a shot.

randlet commented 10 years ago

@ebrelsford can you see if this pull request fixes the issue for you?

ebrelsford commented 10 years ago

Sorry for getting back so late--just tried it (as merged into master) and it works like a charm! Thanks @randlet!

randlet commented 10 years ago

No problem. Glad to hear it worked for you :)