Commits

Preston Holmes committed d446748

added more information to ticket list admin view

Comments (0)

Files changed (3)

tickets-project/dev.db

Binary file modified.
 class PurchaseAdmin (admin.ModelAdmin):
     list_display = ('invoice','name','date','amount')
     inlines = [TicketInline]
+
+class TicketAdmin (admin.ModelAdmin):
+    list_display = ('event','ticket_type','attendee','purchase')
     
 admin.site.register(TicketType)
 admin.site.register(TicketPurchase,PurchaseAdmin)
 admin.site.register(TicketedEvent)
-admin.site.register(Ticket)
+admin.site.register(Ticket, TicketAdmin)

tickets/models.py

     status = models.CharField(default='pending',max_length=20)
     
     def __unicode__(self):
-        return self.name
+        return "%s (%s)" % (self.name, self.status)
         
     def paid(self):
         return "completed" in self.status