Momentum logo
Team 5 Classroom

BE -- Django Models

Posted on Nov 10th, 2020

Today we’ll be focusing on making sure we understand all the capabilities of Django models.

Assignments

By Thursday, you should have Habit Tracker done. This includes the following new and previous stretch goals:

  • One view that adds or updates the daily record for a date. This view should handle the situation that you are entering a new record for a date by updating/replacing the current record.
  • On a page for a habit, you should be able to see your total count across all days as well as your best day and average day.
  • If a user is missing a record for a habit for the previous day, show them a message on their homepage that lets them know and asks them to put in the record. Make it easy to jump from that message to the form to enter the data.
  • All views should implement the correct security features. Users shouldn’t be able to see, create, update, or delete habits or records for each other.

Resources

Back to home