Пример #1
0
 def get_queryset(self):
     qs = UserObjectDateFilterMixin.date_filter(self, Category.objects.all())
     return qs.with_payment_sum()
Пример #2
0
 def get_object(self):
     # This function is called when issuing GET on a RetrieveAPIView,
     # and should return a single model instance queryset
     qs = UserObjectDateFilterMixin.get_queryset(self)
     return get_object_or_404(qs)
Пример #3
0
 def get_queryset(self):
     # super() may be ambigous when using multiple inheritance with
     # overloaded methods, as in this case, so use class name instead
     qs = UserObjectDateFilterMixin.get_queryset(self)
     return qs.order_by('date')