===============SOLUTION HAD BEEN ADDED BELOW==================
I have the python codes that let users edit their comments on a post page.
When the users click on this button below:
<a href="{{ url_for('blog_posts.blog_info_update', blog_validated_id=post2.blog_post_id, blog_info_id=post2.blog_info_id) }}"><button class="btn btn-light btn-sm text-muted ">Edit</button></a>
They will request a "GET" page. Then when they finished editing and post the comment (or form2), they will request a "POST" version of another page:
@blog_posts.route('/<int:blog_validated_id>/<int:blog_info_id>/update', methods=['GET', 'POST'])
@login_required
def blog_info_update(blog_validated_id, blog_info_id):
blog_view = BlogPost.query.get_or_404(blog_validated_id)
blog_info_update = BlogInfo.query.get_or_404(blog_info_id
form2 = BlogInfoForm()
if form2.validate_on_submit():
blog_info_update.text=form2.text.data
db.session.commit()
return redirect(url_for('blog_posts.blog_view', blog_validated_id=blog_validated_id, form2=form2)
elif request.method == 'GET':
form2.text.data = blog_info_update.text
return render_template('blog_view.html', blog_validated_id=blog_validated_id, form2=form2,
blog_info_id=blog_info_update.blog_info_id)
However, when I went to this "GET" version of the page, I see that some codes ( those that I wrote in the static files and connected to my HTML file ) are not showing their functions. I think there is a problem with this "GET" mode that is interfering with my static files (shown below) and I would greatly appreciate if you could help me fix this problem:
The codes below are the one I'm linking my HTML file with:
{% extends "base.html" %}
{% block content %}
<link rel="stylesheet" href="../static/css/blog_view.css">
<script type="text/javascript" src="../static/javascript/blogview.js"></script>
{% endblock %}
An image that shows my problem:
(As @gelonida suggested below, there is a problem with the relative paths or /45/static/css/blog_view.css. In contrast, /static/css/base.css works fine)
Thank you!