Пример #1
0
class PopulatedPropertySerializer(PropertySerializer):

    reviews = PopulatedReviewSerializer(many=True)
    types = PropertyTypeSerializer(many=True)
    offers = PopulatedOfferSerializer(many=True)
    owner = NestedUserSerializer()
    favorited_by = NestedUserSerializer(many=True)
    
Пример #2
0
class WritablePopulatedCommentSerializer(WritableNestedModelSerializer):

    commentor = NestedUserSerializer()

    class Meta:
        model = Comment
        fields = ('text', 'commentor')
Пример #3
0
class WritablePopulatedTicketSerializer(WritableNestedModelSerializer):

    holders = NestedUserSerializer(many=True)
    comments = WritablePopulatedCommentSerializer(many=True)
    tasks = TaskSerializer(many=True)

    class Meta:
        model = Ticket
        fields = ('name', 'description', 'priority', 'deadline', 'column', 'position', 'holders', 'comments', 'tasks', )
Пример #4
0
class PopulatedNestedCommentSerializer(NestedCommentSerializer):
    owner = PopulatedUsersMemberSerializer()
    user_owner = NestedUserSerializer()
Пример #5
0
class PopulatedCommentSerializer(CommentSerializer):
    owner = PopulatedUsersMemberSerializer()
    user_owner = NestedUserSerializer()
    ticket = DetailTicketSerializer()
Пример #6
0
class PopulatedCommentSerializer(CommentSerializer):

    commentor = NestedUserSerializer()
Пример #7
0
class PopulatedTicketSerializer(TicketSerializer):
    owner = PopulatedUsersMemberSerializer()
    user_owner = NestedUserSerializer()
    project = ProjectSerializer()
    assigned_user = PopulatedUsersMemberSerializer()
Пример #8
0
class PopulatedTicketWithOwnerSerializer(DetailTicketSerializer):
    owner = PopulatedUsersMemberSerializer()
    user_owner = NestedUserSerializer()
    assigned_user = PopulatedUsersMemberSerializer()
    comments = PopulatedNestedCommentSerializer(many=True)
Пример #9
0
class PopulatedTicketSerializer(TicketSerializer):

    creator = NestedUserSerializer()
    holders = NestedUserSerializer(many=True)
    comments = PopulatedCommentSerializer(many=True)
    tasks = TaskSerializer(many=True)
Пример #10
0
class PopulatedProjectSerializer(ProjectSerializer):
    owner = NestedUserSerializer()
    members = PopulatedUsersMemberSerializer(many=True)
Пример #11
0
class PopulatedCommentSerializer(CommentSerializer):

    owner = NestedUserSerializer()
Пример #12
0
class PopulatedPokemonSerializer(PokemonSerializer):

    comments = PopulatedCommentSerializer(many=True)
    types = PokemonTypeSerializer(many=True)
    owner = NestedUserSerializer()
    favorited_by = NestedUserSerializer(many=True)
Пример #13
0
class PopulatedKanbanSerializer(KanbanSerializer):

    owner = NestedUserSerializer()
    members = NestedUserSerializer(many=True)
    columns = PopulatedColumnSerializer(many=True)
Пример #14
0
class PopulatedReviewSerializer(ReviewSerializer):

    owner = NestedUserSerializer()
Пример #15
0
class PopulatedUsersMemberSerializer(GroupMemberSerializer):
    """ This Serializer gives back only the user and not the project """

    user = NestedUserSerializer()
Пример #16
0
class PopulatedGroupMemberSerializer(GroupMemberSerializer):

    user = NestedUserSerializer()
    project = ProjectSerializer()
Пример #17
0
class PopulatedOfferSerializer(OfferSerializer):

    owner = NestedUserSerializer()
    offered_property = NestedPropertySerializer()
    requested_property = NestedPropertySerializer()