From 25fc2579f0b0be81ce36cc4029e71d6c35c376f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sun, 19 Jun 2016 18:34:44 +0200 Subject: [PATCH] Incorpore le tirage dans `admin/participant`. - Affiche le tirage de chaque participant. - Permet de filtrer par tirage --- bda/admin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bda/admin.py b/bda/admin.py index 2cdce0a6..476f7d89 100644 --- a/bda/admin.py +++ b/bda/admin.py @@ -16,7 +16,6 @@ class AttributionInline(admin.TabularInline): model = Attribution class ParticipantAdmin(admin.ModelAdmin): - #inlines = [ChoixSpectacleInline] inlines = [AttributionInline] def get_queryset(self, request): return Participant.objects.annotate(nb_places = Count('attributions'), @@ -31,8 +30,9 @@ class ParticipantAdmin(admin.ModelAdmin): else: return u"0 €" total.admin_order_field = "total" total.short_description = "Total à payer" - list_display = ("user", "nb_places", "total", "paid", "paymenttype") - list_filter = ("paid",) + list_display = ("user", "nb_places", "total", "paid", "paymenttype", + "tirage") + list_filter = ("paid", "tirage") search_fields = ('user__username', 'user__first_name', 'user__last_name') actions = ['send_attribs',] actions_on_bottom = True