Python

Errata

This video uses the html5 widget module in WTForms, which is no longer present. See below the video for a fix!

YouTube Video
Widget 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 widgets module.

When running the code as shown in the video, you may receive this error:

Example 13 Import Error Example 13 Import 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:

Example 13 Corrected Code Example 13 Corrected Code

For more information, check out the relevant pull request and the WTForms Widgets Documentation.

Outline

Here is a basic outline of the steps to follow to complete this example.

  1. Clone Starter Code from GitHub
git clone <url> python
  1. Run Project
cd python
python3 -m src
  1. Install Tox
pip3 install tox
  1. Check & Test Existing Project
python3 -m tox
  1. Confirm that project runs and has no style errors.

  2. Follow along with the video to update the project.

  3. When complete, use Git to commit and push updated code.

git add .
git commit -m "Example Complete"
git push
  1. On GitHub, create a release tag and submit URL to Canvas for grading.