Handling forms and file uploads (Simple)
Let's get data from the user. Before we begin, remember to NEVER trust user input because sooner or later someone (or someone's script) with malicious intent will try to break your application.
We are working from the
forms.py file inside the
sched directory of our project.
How to do it...
- Now that we have a data model, we need to present a form to the user in order to fill our database and validate user input to make sure it matches our schema. You can validate incoming data using any tools you like. We will use WTForms in our scheduler.
Flask Flask-Script Flask-SQLAlchemy WTForms
$ pip install -r requirements.txt
- WTForms models forms with classes in a similar style ...