No description
Find a file
2024-02-08 09:14:26 -05:00
app Updated to Bootstrap 5 2023-02-01 23:53:55 -05:00
.env.example Update example .env file 2023-02-02 01:28:50 -05:00
.gitignore updated gitiginore 2023-02-01 21:27:44 -05:00
config.py added load_dotenv function as this is needed when in production 2023-02-02 00:52:14 -05:00
README.md Updated README to include a note about changing the port. 2023-02-02 01:30:55 -05:00
requirements.txt Update to latest version of Flask and other dependencies 2024-02-08 09:14:26 -05:00

Forms in Flask

In this Flask app we will demonstrate the basics of processing forms and also using a form library called WT Forms.

Setup

To Run this application, ensure you have installed Python 3 and follow these steps:

  1. Clone this repository to your development environment.
  2. Change to the directory (e.g. cd flask-forms)
  3. Create a virtual environment using python -m venv venv. In some cases you may need to use python3 -m venv venv.
  4. Activate the virtual environment using source venv/bin/activate or on Windows use .\venv\Scripts\activate.
  5. Run pip install -r requirements.txt
  6. Once that is finished, start the built-in development server using flask --debug run.
  7. Next, open your web browser and go to http://127.0.0.1:5000/ , you should see the Flask forms webpage displayed.

Note: If you added a .env file and changed the FLASK_RUN_PORT value then you will need to change the port in the URL in step 7.