website/conservancy/supporters/admin.py

33 lines
815 B
Python

from django.contrib import admin
from .models import Supporter, SustainerOrder
@admin.register(Supporter)
class SupporterAdmin(admin.ModelAdmin):
list_display = ('display_name', 'display_until_date')
@admin.register(SustainerOrder)
class SustainerOrderAdmin(admin.ModelAdmin):
fields = [
'created_time',
'paid_time',
'payment_method',
'payment_id',
'name',
'email',
'amount',
'acknowledge_publicly',
'add_to_mailing_list',
'tshirt_size',
'street',
'city',
'state',
'zip_code',
'country',
]
readonly_fields = ['created_time', 'paid_time', 'payment_method', 'payment_id']
list_display = ['created_time', 'name', 'email', 'amount', 'paid']
list_filter = ['paid_time']