class PopulatedPropertySerializer(PropertySerializer): reviews = PopulatedReviewSerializer(many=True) types = PropertyTypeSerializer(many=True) offers = PopulatedOfferSerializer(many=True) owner = NestedUserSerializer() favorited_by = NestedUserSerializer(many=True)
class WritablePopulatedCommentSerializer(WritableNestedModelSerializer): commentor = NestedUserSerializer() class Meta: model = Comment fields = ('text', 'commentor')
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', )
class PopulatedNestedCommentSerializer(NestedCommentSerializer): owner = PopulatedUsersMemberSerializer() user_owner = NestedUserSerializer()
class PopulatedCommentSerializer(CommentSerializer): owner = PopulatedUsersMemberSerializer() user_owner = NestedUserSerializer() ticket = DetailTicketSerializer()
class PopulatedCommentSerializer(CommentSerializer): commentor = NestedUserSerializer()
class PopulatedTicketSerializer(TicketSerializer): owner = PopulatedUsersMemberSerializer() user_owner = NestedUserSerializer() project = ProjectSerializer() assigned_user = PopulatedUsersMemberSerializer()
class PopulatedTicketWithOwnerSerializer(DetailTicketSerializer): owner = PopulatedUsersMemberSerializer() user_owner = NestedUserSerializer() assigned_user = PopulatedUsersMemberSerializer() comments = PopulatedNestedCommentSerializer(many=True)
class PopulatedTicketSerializer(TicketSerializer): creator = NestedUserSerializer() holders = NestedUserSerializer(many=True) comments = PopulatedCommentSerializer(many=True) tasks = TaskSerializer(many=True)
class PopulatedProjectSerializer(ProjectSerializer): owner = NestedUserSerializer() members = PopulatedUsersMemberSerializer(many=True)
class PopulatedCommentSerializer(CommentSerializer): owner = NestedUserSerializer()
class PopulatedPokemonSerializer(PokemonSerializer): comments = PopulatedCommentSerializer(many=True) types = PokemonTypeSerializer(many=True) owner = NestedUserSerializer() favorited_by = NestedUserSerializer(many=True)
class PopulatedKanbanSerializer(KanbanSerializer): owner = NestedUserSerializer() members = NestedUserSerializer(many=True) columns = PopulatedColumnSerializer(many=True)
class PopulatedReviewSerializer(ReviewSerializer): owner = NestedUserSerializer()
class PopulatedUsersMemberSerializer(GroupMemberSerializer): """ This Serializer gives back only the user and not the project """ user = NestedUserSerializer()
class PopulatedGroupMemberSerializer(GroupMemberSerializer): user = NestedUserSerializer() project = ProjectSerializer()
class PopulatedOfferSerializer(OfferSerializer): owner = NestedUserSerializer() offered_property = NestedPropertySerializer() requested_property = NestedPropertySerializer()