- from rest_framework import serializers
- from tickets.models import TicketList
- class TicketListSerializer(serializers.ModelSerializer):
- group_name = serializers.CharField(source='group.name', read_only=True)
-
- class Meta:
- model = TicketList
- fields = "__all__"
|