Skip to content

Commit

Permalink
Removing the api logs app (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmadMokhtar authored Dec 25, 2022
1 parent 72e2288 commit ea04205
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
9 changes: 4 additions & 5 deletions quran_tafseer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@

from rest_framework import generics
from rest_framework.exceptions import NotFound
from rest_framework_tracking.mixins import LoggingMixin

from .models import Tafseer, TafseerText
from .serializers import TafseerSerializer, TafseerTextSerializer


class TafseerView(LoggingMixin, generics.ListAPIView):
class TafseerView(generics.ListAPIView):
serializer_class = TafseerSerializer
queryset = Tafseer.objects.all().order_by('pk')

Expand All @@ -21,7 +20,7 @@ def get_queryset(self):
return qs


class AyahTafseerView(LoggingMixin, generics.RetrieveAPIView):
class AyahTafseerView(generics.RetrieveAPIView):
serializer_class = TafseerTextSerializer
model = TafseerText
next_ayah = None
Expand Down Expand Up @@ -53,7 +52,7 @@ def finalize_response(self, request, response, *args, **kwargs):
return response


class AyahTafseerRangeView(LoggingMixin, generics.ListAPIView):
class AyahTafseerRangeView(generics.ListAPIView):
serializer_class = TafseerTextSerializer
model = TafseerText

Expand All @@ -72,7 +71,7 @@ def get_queryset(self):
'ayah are not found')


class TafseerBooksDetailsView(LoggingMixin, generics.RetrieveAPIView):
class TafseerBooksDetailsView(generics.RetrieveAPIView):
serializer_class = TafseerSerializer
model = TafseerText

Expand Down
5 changes: 2 additions & 3 deletions quran_text/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@
from __future__ import unicode_literals

from rest_framework import generics
from rest_framework_tracking.mixins import LoggingMixin

from .models import Ayah, Sura
from .serializers import AyahSerializer, SuraSerializer


class SuraListView(LoggingMixin, generics.ListAPIView):
class SuraListView(generics.ListAPIView):
"""
Returns a full list of quran's sura (chapters) sorted by the index
"""
serializer_class = SuraSerializer
queryset = Sura.objects.all()


class AyahTextView(LoggingMixin, generics.RetrieveAPIView):
class AyahTextView(generics.RetrieveAPIView):
"""
Returns Quran text for certain verse (Ayah) in a chapter (Sura)
"""
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Django==2.2.28
djangorestframework==3.11.2
django-cors-headers==3.7.0
drf-tracking==1.5.0
pytz==2017.2
django-environ==0.4.4
django-filter==2.4.0
Expand Down
1 change: 0 additions & 1 deletion requirements/requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ django-filter==2.4.0
django-silk==1.1.0
djangorestframework==3.11.2
drf-extensions==0.3.1
drf-tracking==1.5.0
enum34==1.1.6
flake8==3.4.1
flake8-isort==2.2.1
Expand Down
1 change: 0 additions & 1 deletion tafseer_api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
'django.contrib.staticfiles',
# 3rd party Apps
'rest_framework',
'rest_framework_tracking',
'corsheaders',
# Internal Apps
'quran_text',
Expand Down

0 comments on commit ea04205

Please sign in to comment.