add_static_view() Does Not Detect Protocol-less Urls #798

Closed
mankyd opened this Issue Jan 15, 2013 · 1 comment

Comments

Projects
None yet
2 participants

mankyd commented Jan 15, 2013

In short, passing the following to add_static_view does not behave as expected:

config.add_static_view('//static.example.com', 'mypackage:static')

It does not detect that as a valid url path, and therefore generates long, broken urls. Ideally, this should generate urls like:

request.static_url('mypackate:static/x.png')
# it should return '//static.example.com/x.png'
# instead it returns 'http://example.com//static.example.com/x.png

In this way, the templates do not need to be rendered differently for HTTP vs HTTPS connections.

Owner

bertjwregeer commented Feb 2, 2013

@mankyd: I do believe I have fixed the issue in pull request #838 if you could test against that I would be grateful!

mmerickel closed this in ff41f86 Mar 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment