1π
β
The common solution to this is the same as with the application templates: use a directory named for the app to namespace the static resources. Here the directory would look like
myapp/
__init__.py
models.py
views.py
static/
myapp/
js/site.js
css/site.css
In the template they would be referenced with {{ STATIC_URL }}
as usual
<script src="{{ STATIC_URL }}myapp/js/site.js"></script>
π€Mark Lavin
Source:stackexchange.com