|
|
|
|
@ -23,6 +23,12 @@ class AuthorBalanceAdmin(admin.ModelAdmin): |
|
|
|
|
class PaymentChildAdmin(PolymorphicChildModelAdmin): |
|
|
|
|
base_model = Payment |
|
|
|
|
show_in_index = True |
|
|
|
|
list_display = ( |
|
|
|
|
'id', |
|
|
|
|
'user', |
|
|
|
|
'amount', |
|
|
|
|
'status', |
|
|
|
|
) |
|
|
|
|
base_fieldsets = ( |
|
|
|
|
(None, {'fields': ('user', 'amount', 'status', 'data',)}), |
|
|
|
|
) |
|
|
|
|
@ -32,11 +38,17 @@ class PaymentChildAdmin(PolymorphicChildModelAdmin): |
|
|
|
|
@admin.register(CoursePayment) |
|
|
|
|
class CoursePaymentAdmin(PaymentChildAdmin): |
|
|
|
|
base_model = CoursePayment |
|
|
|
|
list_display = PaymentChildAdmin.list_display + ('course',) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(SchoolPayment) |
|
|
|
|
class SchoolPaymentAdmin(PaymentChildAdmin): |
|
|
|
|
base_model = SchoolPayment |
|
|
|
|
list_display = PaymentChildAdmin.list_display + ( |
|
|
|
|
'weekdays', |
|
|
|
|
'date_start', |
|
|
|
|
'date_end', |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Payment) |
|
|
|
|
|