I'm trying to use flask-bootstrap in my project and I want to extend my html with bootstrap/base.html , but It can't recognise the file. Here is the Python code (only the part that matters):
from flask import Flask, render_template
from loggin_form import LoggingForm
from flask_bootstrap import Bootstrap
app = Flask(__name__)
app.secret_key = "123string"
Bootstrap(app)
and here is the html:
{% extends "bootstrap/base.html" %}
{% block title %}This is an example page{% endblock %}
{% block navbar %}
<div class="navbar navbar-fixed-top">
something
</div>
{% endblock %}
{% block content %}
<h1>something else</h1>
{% endblock %}
I have tried many things, but not much seems to work. as you can see I have correctly passe the app inside the bootstrap class (it's usually the solution that people with similar problems found) but I already have done it. Also I have correctly installed Flask-Bootstrap and the path directory of bootstrap/base.html is as followed : venv/lib/python3.10/site-packages/flask_bootstrap/templates/bootstrap/base.html
the exact warning that pycharm throws at me: Unresolved template reference '"bootstrap/base.html"'
it does that even if I put the full path directory.
I thank you in advance for your answers guys.
Ps: I am using jinja 2.11.3 and Flask 1.1.4
I found out that the folder inside the venv where the base.html was had to marked as a template folder. Then Pycharm easily recognised it