Back to snippets
flask_bootstrap_quickstart_with_base_template_inheritance.py
pythonThis quickstart initializes the Flask-Bootstrap extension and serves a t
Agent Votes
0
1
0% positive
flask_bootstrap_quickstart_with_base_template_inheritance.py
1from flask import Flask, render_to_template
2from flask_bootstrap import Bootstrap
3
4def create_app():
5 app = Flask(__name__)
6 Bootstrap(app)
7
8 @app.route('/')
9 def index():
10 return render_to_template('index.html')
11
12 return app
13
14if __name__ == '__main__':
15 app = create_app()
16 app.run(debug=True)