1 from django.contrib import admin
2 from django.utils.translation import gettext_lazy as _
6 admin.site.register(models.Fundraiser)
7 admin.site.register(models.Campaign)
9 @admin.register(models.DirectDebit)
10 class DirectDebitAdmin(admin.ModelAdmin):
11 list_display = ['acquisition_date', 'amount', 'first_name', 'last_name']
15 ('first_name', 'sex', 'date_of_birth'),
17 ('street', 'building'),
19 ('postal_code', 'phone'),
26 ('acquisition_date', 'amount'),
32 (_('Processing'), {"fields": [
33 ('is_cancelled', 'needs_redo', 'optout'),
35 'fundraiser_commission',
37 'bank_submission_date',
38 'bank_acceptance_date',
43 readonly_fields = ['agree_contact']
45 def agree_contact(self, obj):
46 return _('obligatory')
47 agree_contact.short_description = _('agree contact')
49 def get_changeform_initial_data(self, request):
51 'payment_id': models.DirectDebit.get_next_payment_id(),