Esempio n. 1
0
 def queryset(self, request, queryset):
     if not self.value() or self.value() == 0:
         return queryset
     return Volunteer.objects.filter(
         tasks__edition=Edition.get_previous()).exclude(
             tasks__edition=Edition.get_current()).distinct()
Esempio n. 2
0
 def lookups(self, request, model_admin):
     edition = Edition.get_previous()
     return [(edition.id, edition.name)]