Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1f02063
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted. Maybe I should actually rewrite the strings to
%spagedown/Markdown.Converter.js
(minus the starting slash) as the django docs recommend that theSTATIC_URL
always end in a slash? Although this way would ensure it works in both situtations1f02063
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.