To capture data from the user, such as a new arena, a form will be used. Create a file called forms.py inside the application folder, and add the following code:
from flask_wtf import FlaskFormfrom wtforms import TextField, FloatFieldclass AddForm(FlaskForm): name = TextField('Arena Name') longitude = FloatField('Longitude') latitude = FloatField('Latitude')
This code will add the fields to a template, which will be discussed in the section on using POST methods. It will allow for code to be entered from an HTML template and passed to the server to add a new arena.