The blueprint I have should look for static files in the root directory but it isn't.
Say I have a blueprint named 'frontend'. 'frontend' only has template_folder='frontend' passed in.
Even if I put the static files under /app/frontend/static/file.css, it doesn't find it. Neither does it find it in /app/static/file.css.
The console webserver says '404' for every css or js static file every time.
But I do have this showing when I print out url_maps:
<Rule '/static/<filename>' (HEAD, OPTIONS, GET) -> static>])
I initiated register_blueprint('frontend') like that.
frontend = Blueprint('frontend', __name__,template_folder='templates')
My index in view returns:
return render_template('frontend.html', pagination=pagination)
frontend.html
can ONLY work in /app/frontend/templates
If you put frontend.html
at /app/templates
it does not work there either. Even if you remove the "template_folder" param.
File structure:
app
-app.py
--frontend
--frontend/templates contains: (frontend.html) (base.html) (errors/404.html)
--static
--static/css (bootstrap.min.css) (what I want to grab with url_for inside base.html)