コード例 #1
0
class PopulatedPlantSerializer(PlantSerializer):

    comments = PopulatedCommentSerializer(many=True)
    categories = CategoriesSerializer(many=True)
    owner = UserSerializer()
コード例 #2
0
class PopulatedCategorySerializer(CategorySerializer):

    comments = PopulatedCommentSerializer(many=True)
コード例 #3
0
class PopulatedArticleSerializer(ArticleSerializer):

    comments = PopulatedCommentSerializer(many=True)
    types = ArticleTypeSerializer(many=True)
    owner = UserSerializer()
    favorites = UserSerializer(many=True)
コード例 #4
0
ファイル: populated.py プロジェクト: ayoolawoye/sei-project-4
class PopulatedSkillSerializer(SkillSerializer):
    comments = PopulatedCommentSerializer(many=True)
    owner = UserSerializer()
コード例 #5
0
class PopulatedPokemonSerializer(PokemonSerializer):

    comments = PopulatedCommentSerializer(many=True)
    types = PokemonTypeSerializer(many=True)
    owner = NestedUserSerializer()
    favorited_by = NestedUserSerializer(many=True)
コード例 #6
0
class PopulatedLoopSerializer(LoopSerializer):
    owner = UserSerializer()
    comments = PopulatedCommentSerializer(many=True)
    likes = PopulatedLikeSerializer(many=True)
    genres = GenreSerializer(many=True)
コード例 #7
0
ファイル: views.py プロジェクト: DanielFDA/sei-project-4
 def get(self, _request):
     comments = Comment.objects.all()
     serialized_comments = PopulatedCommentSerializer(comments, many=True)
     return Response(serialized_comments.data, status=status.HTTP_200_OK)
コード例 #8
0
ファイル: populated.py プロジェクト: isaac-lf/sei-project-4
class PopulatedTicketSerializer(TicketSerializer):

    creator = NestedUserSerializer()
    holders = NestedUserSerializer(many=True)
    comments = PopulatedCommentSerializer(many=True)
    tasks = TaskSerializer(many=True)