heroku-python / dj-static

DEPRECATED - use WhiteNoise instead!
http://kennethreitz.org/introducing-dj-static/
BSD 2-Clause "Simplified" License
511 stars 74 forks source link

Make dj_static handle SCRIPT_NAME settings #43

Closed raphaelm closed 8 years ago

raphaelm commented 9 years ago

Django is able to transparently run under a sub-path of a domain (e.g. http://example.com/mydjangoproject/) as long as the environment variable SCRIPT_NAME is properly set.

dj_static currently is broken in this setup (if STATIC_URL is set correctly for the staticfiles app to work, it never handles the requests as the paths mismatch).

This patch makes dj_static compatible to SCRIPT_NAME using the same transformations as the Django source code.

raphaelm commented 8 years ago

Do you have any reason to reject my pull request?