diff --git a/src/account/models.py b/src/account/models.py index da900ea17f179da18d9c525722bf52c203cea34d..0d401930c244a8ea9bbf38f192e12f69dd870bb2 100644 --- a/src/account/models.py +++ b/src/account/models.py @@ -23,7 +23,9 @@ class Profile(models.Model): updated_at = models.DateTimeField(auto_now=True, editable=False) user = models.OneToOneField(User, related_name='profile', on_delete=models.CASCADE) # TODO: Change the default to json render side - motivation = models.TextField(blank=True, default='') + motivation_about = models.TextField(blank=True, default='') + motivation_profession = models.TextField(blank=True, default='') + motivation_exercise = models.TextField(blank=True, default='') nick = models.CharField(max_length=15, blank=True, default='') signed = models.BooleanField(default=False, null=False) groups = models.ManyToManyField(GroupChoice, related_name='profiles') diff --git a/src/account/serializers.py b/src/account/serializers.py index bee56c0464103291cef16fc206fcb781b6edc0b1..002a20123785df493a05d67e569eabc12ca0f8c9 100644 --- a/src/account/serializers.py +++ b/src/account/serializers.py @@ -15,7 +15,19 @@ class ProfileSerializer(serializers.ModelSerializer): class Meta: model = models.Profile - fields = ('id', 'join_date', 'updated_at', 'user', 'nick', 'motivation', 'signed', 'groups') + fields = ( + 'id', + 'join_date', + 'updated_at', + 'user', + 'nick', + 'motivation', + 'signed', + 'groups', + 'motivation_about', + 'motivation_profession', + 'motivation_exercise', + ) def validate(self, data): deadline = models.Deadline.get_solo().deadline