forked from DGNum/gestioCOF
Merge branch 'Kerl/update_participant_admin' into 'master'
Incorpore le tirage dans `admin/participant`. Dans la liste des participants, dans l'interface admin : - Affiche le tirage de chaque participant. - Permet de filtrer par tirage See merge request !45
This commit is contained in:
commit
fa4f1328b5
1 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,6 @@ class AttributionInline(admin.TabularInline):
|
||||||
model = Attribution
|
model = Attribution
|
||||||
|
|
||||||
class ParticipantAdmin(admin.ModelAdmin):
|
class ParticipantAdmin(admin.ModelAdmin):
|
||||||
#inlines = [ChoixSpectacleInline]
|
|
||||||
inlines = [AttributionInline]
|
inlines = [AttributionInline]
|
||||||
def get_queryset(self, request):
|
def get_queryset(self, request):
|
||||||
return Participant.objects.annotate(nb_places = Count('attributions'),
|
return Participant.objects.annotate(nb_places = Count('attributions'),
|
||||||
|
@ -31,8 +30,9 @@ class ParticipantAdmin(admin.ModelAdmin):
|
||||||
else: return u"0 €"
|
else: return u"0 €"
|
||||||
total.admin_order_field = "total"
|
total.admin_order_field = "total"
|
||||||
total.short_description = "Total à payer"
|
total.short_description = "Total à payer"
|
||||||
list_display = ("user", "nb_places", "total", "paid", "paymenttype")
|
list_display = ("user", "nb_places", "total", "paid", "paymenttype",
|
||||||
list_filter = ("paid",)
|
"tirage")
|
||||||
|
list_filter = ("paid", "tirage")
|
||||||
search_fields = ('user__username', 'user__first_name', 'user__last_name')
|
search_fields = ('user__username', 'user__first_name', 'user__last_name')
|
||||||
actions = ['send_attribs',]
|
actions = ['send_attribs',]
|
||||||
actions_on_bottom = True
|
actions_on_bottom = True
|
||||||
|
|
Loading…
Reference in a new issue