I get this weird issue.
I defined my Flask like the following:
blog = Blueprint(
'blog',
__name__,
template_folder='templates',
static_folder='static'
)
@blog.route("/post")
def post():
return render_template('post.html')
The http://localhost:5000/blog/post
loads the css correctly, however, if I added a parameter to the post()
, the css can not be loaded.
@blog.route("/post/<fileid>")
def post(fileid):
page = download_file_from_google_drive(fileid)
page = Markup(markdown.markdown(page))
return render_template('post.html', page)
The post.html
uses the template. and looks like the following:
{% extends "base.html" %}
{% block content %}
<!-- Page Header -->
<header class="masthead" style="background-image: url('static/img/post-bg.jpg')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<div class="post-heading">
<h1>Man must explore, and this is exploration at its greatest</h1>
<h2 class="subheading">Problems look mighty small from 150 miles up</h2>
<span class="meta">Posted by
<a href="#">Start Bootstrap</a>
on August 24, 2017</span>
</div>
</div>
</div>
</div>
</header>
<!-- Post Content -->
<article>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
{{ page }}
</div>
</div>
</div>
</article>
<hr>
{% endblock %}
Is there something wrong with my BluePrint set up?