-
-
Save NoRePercussions/00a26a4d801a91b01a916f818dd27092 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, render_template | |
from flask_injector import FlaskInjector | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): # put application's code here | |
return render_template("helloworld.html") | |
FlaskInjector(app=app, modules=[]) | |
if __name__ == '__main__': | |
app.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World</title> | |
</head> | |
<body> | |
{% with messages = get_flashed_messages() %} {# F-I tries to resolve something? #} | |
{% if messages %} | |
<ul class=flashes> | |
{% for message in messages %} | |
<li>{{ message }}</li> | |
{% endfor %} | |
</ul> | |
{% endif %} | |
{% endwith %} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Flask~=2.1.3 | |
Flask-Injector~=0.14.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment