Feb 14, 2021

2 min read

Forms with Flask-WTF — A newbie friendly tutorial

In this short tutorial you will learn how to create a (very!) simple app using Flask-WTF. This includes Python, Flask, HTML — and PyCharm.

Use pip install Flask-WTF in the PyCharm Terminal. After that you go to PyCharm /Preferences /Project /Python Interpreter/+. Search for flask-wtf and install it.


Copy the files into PyCharm. The file structure has to be the usual Flask file structure. The login.html and the logged_in.html must be in the templates directory!

After successfully running main.py, click on the Python local host in the run window. Then a Browser will open and show the Login.

For more information go to https://flask-wtf.readthedocs.io/en/stable/ and https://pypi.org/project/Flask-WTF/.