python - Properly Defining Relationships in Django DB -
I am working on the Fitness Games web app. The idea is that there is a certain number of weeks in which each person must complete before appearing next week. Even my models.py schema for the app is: Import the user from the import model from django.contrib.auth.models class WeekOne (models.Model): squat = models.PositiveIntegerField () lunges = models.PositiveIntegerField () skipStairs = models.BooleanField () stairDaysCount = models.PositiveSmallIntegerField () # set to true (squat == 1000), (lunges == 250), # (skipStairs it is true), and (stairDaysCount == 3) weekOneComplete = models.BooleanField () class UserProfile (models.Model): user = models.OneToOneField (user) weekOne = models.ForeignKey (Viagne) I lost some points. First of all, obviously I want every user to be able to track their progress and any other user can see it. What is the best way to do this one week a foreign ? If so, how does each user's data be used after defining this relationship? For exam...