Skip to content
Snippets Groups Projects
Unverified Commit 0e3c9d38 authored by Barnabás Czémán's avatar Barnabás Czémán Committed by GitHub
Browse files

Merge pull request #11 from DevTeamSCH/readable_news_feed

Add author full name to news response.
parents 825d0f51 329a275e
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,11 @@ from rest_framework import serializers
class ArticleListSerializer(serializers.ModelSerializer):
author_name = serializers.SerializerMethodField()
class Meta:
model = Article
fields = serializers.ALL_FIELDS
def get_author_name(self, obj):
return obj.author.user.get_full_name()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment