|
|
|
@ -3,7 +3,7 @@ from rest_framework.response import Response |
|
|
|
from rest_framework import status |
|
|
|
|
|
|
|
|
|
|
|
from ..models import HadisSect, BookReference, Transmitters ,Hadis ,HadisCategory |
|
|
|
from ..models import HadisSect, BookReference, Transmitters ,Hadis ,HadisCategory, BookAuthor |
|
|
|
from ..docs import hadis_info_swagger |
|
|
|
from apps.bookmark.models import Bookmark |
|
|
|
|
|
|
|
@ -23,13 +23,15 @@ class HadisInfoView(APIView): |
|
|
|
status=True |
|
|
|
).count() |
|
|
|
narrator_count = Transmitters.objects.count() |
|
|
|
authors_count = BookAuthor.objects.count() |
|
|
|
|
|
|
|
data = { |
|
|
|
'hadis_count':hadis_count, |
|
|
|
'category_count': category_count, |
|
|
|
'reference_count': reference_count, |
|
|
|
'bookmark_count': bookmark_count, |
|
|
|
'narrator_count': narrator_count |
|
|
|
'narrator_count': narrator_count, |
|
|
|
'authors_count': authors_count |
|
|
|
} |
|
|
|
|
|
|
|
return Response(data, status=status.HTTP_200_OK) |