📅  最后修改于: 2022-03-11 14:59:58.178000             🧑  作者: Mango
from django.shortcuts import get_object_or_404
class TicketDetail(DetailView):
model = Ticket
def get_object(self, queryset=None):
return get_object_or_404(Ticket.objects.all(),uuid=self.kwargs.get("uuid"))