website/conservancy/supporters/admin.py

32 lines
735 B
Python
Raw Normal View History

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',
'name',
'email',
'amount',
'acknowledge_publicly',
'add_to_mailing_list',
'tshirt_size',
'street',
'city',
'state',
'zip_code',
'country',
]
readonly_fields = ['created_time', 'paid_time']
list_display = ['created_time', 'name', 'email', 'amount', 'paid']
list_filter = ['paid_time']