Merge branch 'Aufinal/reset_petitcours' into 'master'

Ajoute une fonction de remise à zéro des compteurs de petits cours

fixes #45 

See merge request !43
This commit is contained in:
Martin Pepin 2016-06-19 11:04:19 +02:00
commit be5ba4090b

View file

@ -154,6 +154,13 @@ class PetitCoursAttributionCounterAdmin(admin.ModelAdmin):
list_display = ('user','matiere','count',)
list_filter = ('matiere',)
search_fields = ('user__username', 'user__first_name', 'user__last_name', 'user__email', 'matiere__name')
actions = ['reset',]
actions_on_bottom = True
def reset(self, request, queryset):
queryset.update(count=0)
reset.short_description = u"Remise à zéro du compteur"
class PetitCoursDemandeAdmin(admin.ModelAdmin):
list_display = ('name','email','agrege_requis','niveau','created','traitee','processed')