Skip to content

Commit

Permalink
Merge pull request #33 from PROCOLLAB-github/dev
Browse files Browse the repository at this point in the history
Add speciality field to serializer
  • Loading branch information
Yakser authored Nov 15, 2022
2 parents f909673 + 97a80b1 commit 695b3fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions users/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class UserFilter(filters.FilterSet):
Adds filtering to DRF list retrieve views
Parameters to filter by:
first_name (str), last_name (str), patronymic (str), specialty (str),
first_name (str), last_name (str), patronymic (str),
city (str), region (str), organization (str), about_me__contains (str),
key_skills__contains (str), useful_to_project__contains (str), speciality (CustomUser.VERBOSE_USER_TYPES)
key_skills__contains (str), useful_to_project__contains (str)
Examples:
?first_name=test equals to .filter(first_name='test')
Expand Down
2 changes: 1 addition & 1 deletion users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class CustomUser(AbstractUser):
region: CharField instance the user's name region.
city: CharField instance the user's name city.
organization: CharField instance the user's place of study or work.
speciality: CharField instance the user's specialty.
datetime_updated: A DateTimeField indicating date of update.
datetime_created: A DateTimeField indicating date of creation.
speciality: CharField instance the user's specialty.
"""

ADMIN = ADMIN
Expand Down
1 change: 1 addition & 0 deletions users/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class Meta:
"first_name",
"last_name",
"patronymic",
"speciality",
"avatar",
"city",
"is_active",
Expand Down

0 comments on commit 695b3fc

Please sign in to comment.