-
-
Save jy95/583b5ea2d3e0470f7c264881cbfb0d51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SkillHistory(models.Model): | |
""" | |
The reason why a Skill is acquired or not, | |
or not yet, when and by who/how | |
""" | |
skill = models.ForeignKey(Skill) | |
"""The Skill to validate""" | |
student = models.ForeignKey('users.Student') | |
"""The Student concerned by this Skill""" | |
datetime = models.DateTimeField(auto_now_add=True) | |
"""The date the Skill status was created""" | |
value = models.CharField(max_length=255, choices=( | |
('unknown', 'Inconnu'), | |
('acquired', 'Acquise'), | |
('not acquired', 'None Acquise'), | |
)) | |
"""The Skill status : unknown, acquired or not acquired""" | |
content_type = models.ForeignKey(ContentType) | |
object_id = models.PositiveIntegerField() | |
reason_object = GenericForeignKey('content_type', 'object_id') | |
reason = models.CharField(max_length=255) | |
"""Why the Skill is validated or not""" | |
by_who = models.ForeignKey(User) | |
class Meta: | |
ordering = ['datetime'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment