Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewakiv committed Dec 6, 2024
1 parent 680e7d7 commit f60ce28
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions BackEnd/administration/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from django.http import JsonResponse
from django.views import View
from django.db.models import Q
from drf_spectacular.utils import (
extend_schema,
OpenApiExample,
Expand Down Expand Up @@ -37,8 +36,6 @@
from django_filters.rest_framework import DjangoFilterBackend
from .filters import UsersFilter

from rest_framework.permissions import AllowAny


class UsersListView(ListAPIView):
"""
Expand Down Expand Up @@ -114,30 +111,12 @@ class ProfileStatisticsView(RetrieveAPIView):
Count of companies
"""
queryset = Profile.objects.all()
permission_classes = [AllowAny]
permission_classes = [IsStaffUser]
serializer_class = StatisticsSerializer

def get_object(self):
return {}

# def get_serializer_context(self):
# context = super().get_serializer_context()
# context["companies_count"] = (
# self.get_queryset()
# .filter(Q(is_registered=True) | Q(is_startup=True))
# .count()
# )
# context["investors_count"] = (
# self.get_queryset().filter(is_registered=True).count()
# )
# context["startups_count"] = (
# self.get_queryset().filter(is_startup=True).count()
# )
# context["blocked_companies_count"] = (
# self.get_queryset().filter(status='blocked').count()
# )
# return context


@extend_schema(
request=AutoModerationHoursSerializer,
Expand Down

0 comments on commit f60ce28

Please sign in to comment.