Created
November 20, 2018 02:57
-
-
Save esirK/446d11f831b3a7187f64baf0e3a84863 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework.generics import GenericAPIView | |
from rest_framework.mixins import ListModelMixin | |
from .models import Article | |
from .serializers import ArticleSerializer | |
class ArticleView(ListModelMixin, GenericAPIView): | |
queryset = Article.objects.all() | |
serializer_class = ArticleSerializer | |
def get(self, request, *args, **kwargs): | |
return self.list(request, *args, *kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment