from django.views.generic import ListView

from models import Ticket


class MyTicketListView(ListView):
    model = Ticket
    template_name = 'tickets/ticket_mylist.html'

    def get_queryset(self):
        return Ticket.objects.filter(creator=self.request.user)

@@ -34,16 +34,28 @@
 ListView
+, DetailView
 %0A%0Afrom m
@@ -271,8 +271,210 @@
 t.user)%0A
+%0Aclass MyTicketDetailView(DetailView):%0A    model = Ticket%0A    template_name = 'tickets/ticket_mydetail.html'%0A%0A    def get_queryset(self):%0A        return Ticket.objects.filter(creator=self.request.user)%0A

implement generic my ticket detail view