website/conservancy/supporters/admin.py

34 lines
867 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',
'recurring',
'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', 'recurring']
list_display = ['created_time', 'name', 'email', 'amount', 'recurring', 'paid_time']
list_filter = ['paid_time']