Courses‎ > ‎Software Development‎ > ‎Dyrland-Weaver‎ > ‎Work-Term_1‎ > ‎

Work 07: It's login, login, it's better than bad, it's good!

posted Oct 3, 2017, 8:23 PM by JonAlf Dyrland-Weaver   [ updated Oct 3, 2017, 8:26 PM ]
Yes, I know you have no idea what the title is about, so go here, you're welcome.

Work in pairs for this. You may self select pairs.

Continue working on the login flask app we have been building in class. For now, hardcode in your flask app a username and password combination. Include the following features:
  • The root route goes to the login form
  • The form send
     data to the flask app
  • The form target should check the credentials, and render a welcome page or an error page
    • If login failed, then a message should display what went wrong (bad password? bad username?)
  • Implement sessions
  • When a user logs in, a session should be established with the username stored
  • Root route should have 2 behaviors now
    • If the user is logged in, it should take them to a welcome page
    • If the user is not logged in, it should take them to the login page
  • Welcome page (successful login) should have a logout button that goes to a separate route that will log the user out of the session

Submit this as 07_login in the workshop.