Не сделан фильтр с серилизатора
This commit is contained in:
1 parent
a815e59043
commit
74082b69ee
7 files changed
+53
-25
No files matched your search
+14
-2
@@ -11,9 +11,20 @@ from .models import *
|
||||
|
||||
|
||||
class BaseCriteriaAPI(ListAPIView):
|
||||
print('-----------Отправляю GET запрос в таблицу BaseCriteria-----------')
|
||||
|
||||
serializer_class = BaseCriteriaSerializer
|
||||
queryset = BaseCriteria.objects.all()
|
||||
|
||||
def get_queryset(self):
|
||||
queryset = BaseCriteria.objects.all()
|
||||
get_criteria = self.args
|
||||
print('!!!!!!!!!!!!!', get_criteria)
|
||||
return queryset
|
||||
|
||||
# def get_serializer_context(self):
|
||||
# context = super().get_serializer_context()
|
||||
# context['get_criteria']=RatingStatus.objects.filter()
|
||||
# print( RatingStatus.objects.last(), '-----------Отправляю GET запрос в таблицу BaseCriteria-----------')
|
||||
# return context
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +44,7 @@ class UserCommentAPI(ListCreateAPIView):
|
||||
def get_queryset(self):
|
||||
print('-----------Отправляю GET запрос в таблицу UserComment-----------')
|
||||
queryset = UserComment.objects.filter(user_id=self.request.user.id, time_create__contains=datetime.date.today())
|
||||
print(queryset)
|
||||
return queryset
|
||||
|
||||
def perform_create(self, serializer):
|
||||
|
||||
Reference in new issue
Block a user