2015-01-03 14:36:22 +00:00
|
|
|
from django.contrib import admin
|
2023-10-19 22:44:24 +00:00
|
|
|
|
2024-07-22 10:13:22 +00:00
|
|
|
from .models import Supporter, SustainerOrder
|
2023-10-19 22:44:24 +00:00
|
|
|
|
2015-01-03 14:36:22 +00:00
|
|
|
|
2024-03-20 22:35:00 +00:00
|
|
|
@admin.register(Supporter)
|
2015-01-03 14:36:22 +00:00
|
|
|
class SupporterAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('display_name', 'display_until_date')
|
2024-07-22 10:13:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
@admin.register(SustainerOrder)
|
|
|
|
class SustainerOrderAdmin(admin.ModelAdmin):
|
|
|
|
fields = [
|
|
|
|
'created_time',
|
|
|
|
'paid_time',
|
2024-10-08 15:01:32 +00:00
|
|
|
'payment_method',
|
|
|
|
'payment_id',
|
2024-07-22 10:13:22 +00:00
|
|
|
'name',
|
|
|
|
'email',
|
|
|
|
'amount',
|
|
|
|
'acknowledge_publicly',
|
|
|
|
'add_to_mailing_list',
|
|
|
|
'tshirt_size',
|
|
|
|
'street',
|
|
|
|
'city',
|
|
|
|
'state',
|
|
|
|
'zip_code',
|
|
|
|
'country',
|
|
|
|
]
|
|
|
|
|
2024-10-08 15:01:32 +00:00
|
|
|
readonly_fields = ['created_time', 'paid_time', 'payment_method', 'payment_id']
|
2024-07-22 10:13:22 +00:00
|
|
|
list_display = ['created_time', 'name', 'email', 'amount', 'paid']
|
|
|
|
list_filter = ['paid_time']
|