views.py 368 Bytes
Newer Older
luxcem's avatar
luxcem committed
1
2
3
4
5
from rest_framework import viewsets

from rp.models import Article
from .serializers import ArticleSerializer

6
7
from .mixins import get_viewset_transition_actions_mixin
ArticleMixin = get_viewset_transition_actions_mixin(Article)
luxcem's avatar
luxcem committed
8

9
10

class ArticleViewSet(ArticleMixin, viewsets.ModelViewSet):
luxcem's avatar
luxcem committed
11
12
    queryset = Article.objects.all()
    serializer_class = ArticleSerializer