Answer the question
In order to leave comments, you need to log in
Flask blueprint how to properly distribute static?
Good afternoon.
I want to store template and static in each blueprint, but I want to distribute from the general static. I am using flask-webassets
Structure
app
--- blueprint_name
------ template
------ static
--------- js
--- static
------ js
----- ---- gen
------------ blueprint_name
in template:
{% assets filters="jsmin", output="js/gen/blueprint_name/script.js", "blueprint_name/js/script.js" %}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
<script type="text/javascript" src="/blueprint_name/static/js/script.js"></script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question