-
-
Save TheMuellenator/29acd670326c6313bc2b8f7e66fd441f to your computer and use it in GitHub Desktop.
| from flask import Flask, render_template | |
| app = Flask(__name__) | |
| @app.route("/") | |
| def home(): | |
| return render_template('index.html') | |
| @app.route("/login") | |
| def login(): | |
| return render_template("login.html") | |
| if __name__ == '__main__': | |
| app.run(debug=True) |
I still have error on "address already in use and start with a new server port"
For people who see this part in December 2022 and receive error : ImportError: cannot import name 'Markup' from 'jinja2', put below codes inside of requirement.txt. Good luck!.
click==8.0.4 Flask==2.0.3 itsdangerous==2.1.2 Jinja2==3.1.1 MarkupSafe==2.1.1 Werkzeug==2.0.3
Thanks man this works.
If you don't understand why there is no Login button, go back and check the lessons on Bootstrap!
Just incase someone might need it. Here are the updated version of the required packages in the requirements.txt file
Bootstrap_Flask==2.5.0
Flask==3.1.2
WTForms==3.2.1
Flask_WTF==1.2.2
Werkzeug==3.1.3
Just in case anyone might need this. These worked for me, perfectly well. Cheers
Bootstrap_Flask==2.5.0
Flask==3.1.2
WTForms==3.0.1
Flask_WTF==1.2.1
Werkzeug==3.1.0
Jinja2==3.1.2
itsdangerous==2.2.0
flask
I still have this error message after upgrading the framworks.
