WebApps: Flask HW #2 User Form and Table

All Homework Must be Uploaded to it own GitHub repository. You will copy the URL Link for your GitHub Repository and Submit that link for each of your homework assignments

Homework #2 User Forms and Table for Car Collection API:

In continuation with this module’s homework, your task is to build a form for a user to input data and persist that data into a Car-Collection Database Table Called “user”.

You will need to create the following:

  • Inside of the blueprint folder for “authentication” (assuming the name is “authentication”):
  • 1 routes: One for “signup”
  • 1 User Model with the basic infomation listed:
  • ID
  • First_name
  • Last_name
  • email
  • password
  • token
  • date_created
  • 1 Form with the following information:
  • email
  • password
  • submit_button
  • 1 .env file: to add your DATABASE_URL

Note: You may add more to your Form/Model if you would like, but the min is listed above.

So by the end of the homework for tonight you should have:

  • A Database Called “car-collection” (Create this inside of Elephant SQL)
  • A Database Table called “user”
  • A form that can be placed on your HTML for signup
  • Data in the user table given to your database by the user form

HINT: You will need to add the following dependencies to your virtual environment

  • pip install Flask-WTF
  • pip install Flask-Migrate
  • pip install psycopg2
  • pip install psycopg2-binary — For those on mac machines
  • pip install email-validator — Verification of emails inside of forms
  • pip install python-dotenv

Skip to content