menggunakan slug atau .. bukan pk di django
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"))
Clever Constrictor