flask-assets
flask-assets copied to clipboard
alternative way to render asset url in templates
the standard way of render url takes 3 lines
{% assets 'main_css' %}
<link rel="stylesheet" href="{{ASSET_URL}}">
{% endassets %}
This seems to be a bit verbose I am wondering if it's possible to provide helper function in template like this:
<link rel="stylesheet" href="{{asset_url('main_css')}}">
It isn't, because the template helper needs to be able to update multiple urls. The only thing that would be possible is:
<head>
{{asset('main_css')}}
</head>
This is only because of the debug mode, right?