1. Preston Holmes
  2. django-tickets

Commits

Preston Holmes  committed 0fe334f

added status to purchase list admin

  • Participants
  • Parent commits d446748
  • Branches default

Comments (0)

Files changed (2)

File tickets/admin.py

View file
     model = Ticket
 
 class PurchaseAdmin (admin.ModelAdmin):
-    list_display = ('invoice','name','date','amount')
+    list_display = ('invoice','name','date','amount','status')
     inlines = [TicketInline]
 
 class TicketAdmin (admin.ModelAdmin):
-    list_display = ('event','ticket_type','attendee','purchase')
+    list_display = ('event','ticket_type','attendee','paid')
+    # list_filter = ('paid',)
     
 admin.site.register(TicketType)
 admin.site.register(TicketPurchase,PurchaseAdmin)

File tickets/models.py

View file
         return self.attendee or self.purchase.name
         
     def paid(self):
-        return self.purchase.paid
+        return self.purchase.paid()