Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses
Commits
53279375
Commit
53279375
authored
3 years ago
by
Bruno Antunes Magrini
Browse files
Options
Download
Plain Diff
Merge branch 'feature/new-profile-form-fields' into develop
parents
ad100d80
4ff7ba25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
courses/reports/serializers.py
courses/reports/serializers.py
+14
-0
No files found.
courses/reports/serializers.py
View file @
53279375
...
...
@@ -29,7 +29,21 @@ class UserInDetailSerializer(serializers.ModelSerializer):
'topics_created'
,
'number_of_likes'
,
'comments_created'
,
'living_area'
,
'gender'
,
'race'
,
'birth_date'
,
'city'
,
))
city
=
serializers
.
SlugRelatedField
(
many
=
False
,
read_only
=
True
,
slug_field
=
'display_name'
)
gender
=
serializers
.
CharField
(
source
=
'get_gender_display'
)
race
=
serializers
.
CharField
(
source
=
'get_race_display'
)
living_area
=
serializers
.
CharField
(
source
=
'get_living_area_display'
)
comments_created
=
serializers
.
SerializerMethodField
()
topics_created
=
serializers
.
SerializerMethodField
()
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment