Open kitsuta opened 6 years ago
Even better if we could start supporting URLs that have paths deeper than one level. I was able to use the path to create a nice URL like this: https://staging4.uber.magfest.org/uber/attractions/escape-room
But I couldn't add another path level for features, so I had to do this: https://staging4.uber.magfest.org/uber/attractions/escape-room?feature=egyptian-tomb
The reason we can't have paths more than one level deep is because of how we include javascript and css files in base.html
:
<link rel="stylesheet" href="../static/deps/combined.min.css" />
<script src="../static/deps/combined.min.js" type="text/javascript"></script>
With a second path level in the URL we get 404s for those resources.
Whoa, wait, is that seriously the only reason? Or would we have to eliminate ALL relative URLs?
There's probably other places with this issue, but those were the only ones I encountered.
Let's consider that part of this issue, then!
It was out of scope for the related PR, but it would be SUPER nice if this code: https://github.com/magfest/panels/blob/11216ab653ffe78c9ebd6dd92ee8ba07dab5b100/panels/site_sections/attractions_admin.py#L340
from the panels repo was generic-ified and turned into a decorator. Pretty URLs for everyone!