Support for {% static %}
It would be very nice to have support for {% static %}. Any plans?
What do you mean by "support for {% static %}"? You can include js_reverse within static by using
<script src="{% url js_reverse %}" type="text/javascript"></script>
I mean this:
Urls.static('img/something.jpg') // same output as {% static 'img/something.jpg' %}
Why is this useful? I'm using vuejs and I want to use django-js-reverse from withing my vue component templates, which do not have a django template context attached.
ATM i don't need such access to my static content, but feel free to fork and add a PR :-)
Fair enough. Will do. I think this feature would be quite useful for those using angularjs or vue-router (my case).
@imaia Have you done any work on this? I agree that it would be useful.
I'm using vue in my project. I've resolved problem with static files using collectstatic preprocessing phase - each static route found in bundle.js is replaced with a proper path (i'm using ManifestStaticFilesStorage, but you can write your own custom storage)
I did @paulshannon PR on its way.
any updates regarding the PR?
Not so far. I confess to have forgotten about it.