This video uses the
html5 widget module in WTForms, which is no longer present. See below the video for a fix!
Since this video was recorded, Flask-WTF updated and is now using a newer version of the underlying WTForms library. That library has since deprecated the
html5 widgets module and moved them into the main
When running the code as shown in the video, you may receive this error:
To resolve this, in
MovieForm.py we can simply change the import to be
from wtforms.widgets import NumberInput and then remove the
html5 in front of each instance where we use
NumberInput in the code. See the screenshot below for a corrected version:
Here is a basic outline of the steps to follow to complete this example.
- Clone Starter Code from GitHub
git clone <url> python
- Run Project
cd python python3 -m src
- Install Tox
pip3 install tox
- Check & Test Existing Project
python3 -m tox
Confirm that project runs and has no style errors.
Follow along with the video to update the project.
When complete, use Git to commit and push updated code.
git add . git commit -m "Example Complete" git push
- On GitHub, create a release tag and submit URL to Canvas for grading.