Карточки пользователей
This commit is contained in:
1 parent
0a1b3b2bf9
commit
5f4ea62005
16 files changed
+66
-20
No files matched your search
@@ -68,7 +68,7 @@ class NewsSerializer(serializers.ModelSerializer):
|
||||
return False
|
||||
|
||||
def get_user(self, obj):
|
||||
return ShortUserSerializer(DictEmployee.objects.get(login=obj.author.username)).data
|
||||
return InfoUserCardSerializer(DictEmployee.objects.get(login=obj.author.username)).data
|
||||
|
||||
def get_score(self, obj):
|
||||
return ScoreNewsSerializer(obj.get_news.all(), many=True).data
|
||||
|
||||
@@ -111,6 +111,7 @@ class NewsCrossroadAPIView(ListAPIView):
|
||||
|
||||
result = NewsSerializer(newsqueryset, many=True).data
|
||||
|
||||
|
||||
return Response({"result":result, "countpage": countpage})
|
||||
|
||||
def post(self, request):
|
||||
|
||||
Reference in new issue
Block a user