feat(admin): set default parcel payment status to paid for testing
This commit is contained in:
parent
effc25d32e
commit
ac8178554a
@ -122,6 +122,11 @@ class ParcelAdmin(admin.ModelAdmin):
|
|||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def get_changeform_initial_data(self, request):
|
||||||
|
initial = super().get_changeform_initial_data(request)
|
||||||
|
initial['payment_status'] = 'paid'
|
||||||
|
return initial
|
||||||
|
|
||||||
def export_as_csv(self, request, queryset):
|
def export_as_csv(self, request, queryset):
|
||||||
response = HttpResponse(content_type='text/csv')
|
response = HttpResponse(content_type='text/csv')
|
||||||
response['Content-Disposition'] = 'attachment; filename="parcels_report.csv"'
|
response['Content-Disposition'] = 'attachment; filename="parcels_report.csv"'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user