queryset method is not get_queryset (django 1.8)
This commit is contained in:
parent
bf0a29655a
commit
6782f2991a
3 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ class AttributionInline(admin.TabularInline):
|
||||||
class ParticipantAdmin(admin.ModelAdmin):
|
class ParticipantAdmin(admin.ModelAdmin):
|
||||||
#inlines = [ChoixSpectacleInline]
|
#inlines = [ChoixSpectacleInline]
|
||||||
inlines = [AttributionInline]
|
inlines = [AttributionInline]
|
||||||
def queryset(self, request):
|
def get_queryset(self, request):
|
||||||
return Participant.objects.annotate(nb_places = Count('attributions'),
|
return Participant.objects.annotate(nb_places = Count('attributions'),
|
||||||
total = Sum('attributions__price'))
|
total = Sum('attributions__price'))
|
||||||
def nb_places(self, obj):
|
def nb_places(self, obj):
|
||||||
|
|
|
@ -17,7 +17,7 @@ class AttributionInline(admin.TabularInline):
|
||||||
class ParticipantAdmin(admin.ModelAdmin):
|
class ParticipantAdmin(admin.ModelAdmin):
|
||||||
#inlines = [ChoixSpectacleInline]
|
#inlines = [ChoixSpectacleInline]
|
||||||
inlines = [AttributionInline]
|
inlines = [AttributionInline]
|
||||||
def queryset(self, request):
|
def get_queryset(self, request):
|
||||||
return Participant.objects.annotate(nb_places = Count('attributions'),
|
return Participant.objects.annotate(nb_places = Count('attributions'),
|
||||||
total = Sum('attributions__price'))
|
total = Sum('attributions__price'))
|
||||||
def nb_places(self, obj):
|
def nb_places(self, obj):
|
||||||
|
|
|
@ -17,7 +17,7 @@ class AttributionInline(admin.TabularInline):
|
||||||
class ParticipantAdmin(admin.ModelAdmin):
|
class ParticipantAdmin(admin.ModelAdmin):
|
||||||
#inlines = [ChoixSpectacleInline]
|
#inlines = [ChoixSpectacleInline]
|
||||||
inlines = [AttributionInline]
|
inlines = [AttributionInline]
|
||||||
def queryset(self, request):
|
def get_queryset(self, request):
|
||||||
return Participant.objects.annotate(nb_places = Count('attributions'),
|
return Participant.objects.annotate(nb_places = Count('attributions'),
|
||||||
total = Sum('attributions__price'))
|
total = Sum('attributions__price'))
|
||||||
def nb_places(self, obj):
|
def nb_places(self, obj):
|
||||||
|
|
Loading…
Reference in a new issue