Outils pour utilisateurs

Outils du site


Panneau latéral

Plan du Site:

python:flask:bootstrap

Flask Bootstrap - /!\ Bootstrap 3 /!\

Installation

pip install flask_bootstrap

Initialisation

from flask import Flask, render_template
from flask_bootstrap import Bootstrap
 
app = Flask(__name__)
Bootstrap(app)
 
@app.route('/')
def index():
    return render_template('index.html')
 
if __name__ == '__main__':
    app.run(debug=True)

Template

{% extends "bootstrap/base.html" %}
 
{% block title %}Exemple{% endblock %}
 
{% block content %}
<h1>Hello !!!</h1>
{% endblock %}

Blocs disponibles

Voir la liste complète

  • title
  • styles
  • navbar
  • content
  • scripts
python/flask/bootstrap.txt · Dernière modification: 2021/12/13 07:39 (modification externe)