Skip to content

Commit 695b3fc

Browse files
authored
Merge pull request #33 from PROCOLLAB-github/dev
Add speciality field to serializer
2 parents f909673 + 97a80b1 commit 695b3fc

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

users/filters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ class UserFilter(filters.FilterSet):
99
Adds filtering to DRF list retrieve views
1010
1111
Parameters to filter by:
12-
first_name (str), last_name (str), patronymic (str), specialty (str),
12+
first_name (str), last_name (str), patronymic (str),
1313
city (str), region (str), organization (str), about_me__contains (str),
14-
key_skills__contains (str), useful_to_project__contains (str), speciality (CustomUser.VERBOSE_USER_TYPES)
14+
key_skills__contains (str), useful_to_project__contains (str)
1515
1616
Examples:
1717
?first_name=test equals to .filter(first_name='test')

users/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ class CustomUser(AbstractUser):
4242
region: CharField instance the user's name region.
4343
city: CharField instance the user's name city.
4444
organization: CharField instance the user's place of study or work.
45+
speciality: CharField instance the user's specialty.
4546
datetime_updated: A DateTimeField indicating date of update.
4647
datetime_created: A DateTimeField indicating date of creation.
47-
speciality: CharField instance the user's specialty.
4848
"""
4949

5050
ADMIN = ADMIN

users/serializers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class Meta:
5555
"first_name",
5656
"last_name",
5757
"patronymic",
58+
"speciality",
5859
"avatar",
5960
"city",
6061
"is_active",

0 commit comments

Comments
 (0)