def goal(self): return Goal.get_by_id(self.goal_id)
def _start_first_phase(self): self._user.current_phase_id = Goal.get_by_id(self.goal_id).start_phase_id self._user.current_week_in_phase = 1 min_length, max_length = PhaseLengthByGoal.get_min_max_phase_length_for_goal_phase(self.goal_id, self._user.current_phase_id) self._user.total_weeks_in_phase = random.randint(min_length, max_length) self._user.save()
def get_cardio_type_id(self): return Goal.get_by_id(self.goal_id).cardio_type_id