X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/10dc1a5e84d23582a58ead2551ddf54a66b94496..388e067266479b2c201d94ffad6e199f17e3ff17:/src/api/views.py diff --git a/src/api/views.py b/src/api/views.py index 5df3d689d..69f9b8b03 100644 --- a/src/api/views.py +++ b/src/api/views.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # @@ -16,7 +15,6 @@ from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from rest_framework.generics import ListAPIView, RetrieveAPIView, get_object_or_404 -from migdal.models import Entry from catalogue.models import Book from .models import BookUserData from . import serializers @@ -169,15 +167,6 @@ class BookUserDataView(RetrieveAPIView): return Response(serializer.data) -class BlogView(ListAPIView): - serializer_class = serializers.BlogSerializer - - def get_queryset(self): - after = self.request.query_params.get('after') - count = int(self.request.query_params.get('count', 20)) - entries = Entry.published_objects.filter(in_stream=True).order_by('-first_published_at') - if after: - entries = entries.filter(first_published_at__lt=after) - if count: - entries = entries[:count] - return entries +class BlogView(APIView): + def get(self, request): + return Response([])