31 lines
735 B
Python
31 lines
735 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',
|
|
'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']
|