Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Session(models.Model):
- corporal_structures = models.ForeignKey(SingleBodySegment)
- movement = ChainedManyToManyField(
- Movements,
- chained_field = 'corporal_structures',
- chained_model_field = 'corporal_segments'
- )
- metrics = models.ManyToManyField(Metrics, blank=True)
- date_session_begin = models.DateTimeField(default=timezone.now())
- date_session_end = models.DateTimeField(default=timezone.now())
- observations = models.TextField(blank=False)
- class Metrics(models.Model):
- name = models.CharField(max_length=255, blank=True)
- equation = models.CharField(max_length=255, blank=True)
- min_value = models.DecimalField(max_digits=5,decimal_places=3)
- max_value = models.DecimalField(max_digits=5,decimal_places=3)
- def __str__(self):
- return "%s" % self.name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement