From c63be1be6e9b43d79af08b8fb0dcc2c89280b9f0 Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Fri, 7 Jun 2019 15:03:56 +0200 Subject: [PATCH] hide training field on admin student page : https://trackers.pilotsystems.net/probarreau/0478 --- teleforma/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teleforma/admin.py b/teleforma/admin.py index d8f0564d..a111973c 100644 --- a/teleforma/admin.py +++ b/teleforma/admin.py @@ -107,9 +107,8 @@ class BalanceFilter(admin.SimpleListFilter): class StudentAdmin(admin.ModelAdmin): - model = Student - exclude = ['options'] + exclude = ['options', 'training'] filter_horizontal = ['trainings'] inlines = [PaymentInline, OptionalFeeInline, DiscountInline, PaybackInline] search_fields = ['user__first_name', 'user__last_name', 'user__username'] @@ -145,6 +144,7 @@ class StudentAdmin(admin.ModelAdmin): response['Content-Disposition'] = 'attachment; filename=users.xls' book.book.save(response) return response + export_xls.short_description = "Export vers XLS" def add_to_group(self, request, queryset): -- 2.39.5