Remove double slash in form media #9

Merged
merged 1 commit into from Apr 2, 2013

Projects

None yet

2 participants

@BrianHicks
Contributor

If settings.STATIC_URL ends in a slash, it may raise a SuspiciousOperation error when run through tools like django-compressor. Removing trailing slashes from STATIC_URL fixes this.

@BrianHicks BrianHicks Remove double slash in form media
If `settings.STATIC_URL` ends in a slash, it may raise a `SuspiciousOperation` error when run through tools like django-compressor. Removing trailing slashes from STATIC_URL fixes this.
1f02063
@timmyomahony

Well spotted. Maybe I should actually rewrite the strings to %spagedown/Markdown.Converter.js (minus the starting slash) as the django docs recommend that the STATIC_URL always end in a slash? Although this way would ensure it works in both situtations

Owner

That's what I was thinking - I've worked on projects both ways. I think it's better to work with the complete range of input rather than hard-coding it in either direction. Principle of least astonishment and all that.

@timmyomahony timmyomahony merged commit 16f9f7c into timmyomahony:master Apr 2, 2013
@timmyomahony
Owner

Agreed. Thanks!

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