annapetrone / dojo-py1-email-val-db

Email validation and entry into database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Email database

On the landing page, users input their email address. Upon hitting Submit, the email address is sent to the /process route, which checks that the string matches the email regular expression. If it does not, a flash message is created and the user is redirected to the form to try entering their email again. Upon successfully entering an email address, the user is routed to /success, which inserts the record into the database, and then looks up all email addresses and the timestamp at which they were created, and passes this list of tuples to the render_template function for success.html. Each email has a Remove link next to it, which routes to /remove/<user_id>. The sends a delete statement to the database to remove that record, and then the success page reloads, and the removed record is gone.

Screenshots

Landing Page

Landing page

Invalid email

Landing page

Success / Email list

Note that the list gets a scrollbar if it becomes very long.

Email list

About

Email validation and entry into database


Languages

Language:Python 55.9%Language:HTML 26.1%Language:CSS 18.0%