generated from westfarn/web_django_template
Stand up Print Forge as a 3D-printed toy shop with color variants and printer photography.
Replaces the client_site template branding, adds shop/shipping, and points beta CI at master for easy deploy. Closes #1
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from events.models import Event, Ticket, TicketOrder
|
||||
|
||||
|
||||
@admin.register(Event)
|
||||
class EventAdmin(admin.ModelAdmin):
|
||||
list_display = ("title", "starts_at", "capacity", "price", "is_published")
|
||||
list_filter = ("is_published",)
|
||||
search_fields = ("title", "venue")
|
||||
prepopulated_fields = {"slug": ("title",)}
|
||||
|
||||
|
||||
@admin.register(TicketOrder)
|
||||
class TicketOrderAdmin(admin.ModelAdmin):
|
||||
list_display = ("number", "event", "email", "quantity", "status")
|
||||
list_filter = ("status",)
|
||||
search_fields = ("number", "email")
|
||||
|
||||
|
||||
@admin.register(Ticket)
|
||||
class TicketAdmin(admin.ModelAdmin):
|
||||
list_display = ("code", "event", "order")
|
||||
search_fields = ("code",)
|
||||
Reference in New Issue
Block a user