from rest_framework import viewsets
from rest_framework.response import Response
from rest_framework import status
from django_filters.rest_framework import DjangoFilterBackend
import json

# Create your views here.
from newsAPI.models import News, NewsHistory
from newsAPI.serializers import NewsSerializer, NewsHistorySerializer
from newsAPI.filter import NewsFilter, NewsHistoryFilter

class NewsViewSet(viewsets.ModelViewSet):
  queryset = News.objects.all()
  serializer_class = NewsSerializer
  filter_class = NewsFilter
  

class NewHistoryViewSet(viewsets.ModelViewSet):
  queryset = NewsHistory.objects.all()
  serializer_class = NewsHistorySerializer
  # filter_class = NewsHistoryFilter
  filter_fields = ('id', 'news')
a8536a8c7032bed26c1781fae0234613fa60aa20
<mask token>


class NewHistoryViewSet(viewsets.ModelViewSet):
    queryset = NewsHistory.objects.all()
    serializer_class = NewsHistorySerializer
    filter_fields = 'id', 'news'

<mask token>


class NewsViewSet(viewsets.ModelViewSet):
    <mask token>
    <mask token>
    <mask token>


class NewHistoryViewSet(viewsets.ModelViewSet):
    queryset = NewsHistory.objects.all()
    serializer_class = NewsHistorySerializer
    filter_fields = 'id', 'news'

<mask token>


class NewsViewSet(viewsets.ModelViewSet):
    queryset = News.objects.all()
    serializer_class = NewsSerializer
    filter_class = NewsFilter


class NewHistoryViewSet(viewsets.ModelViewSet):
    queryset = NewsHistory.objects.all()
    serializer_class = NewsHistorySerializer
    filter_fields = 'id', 'news'

from rest_framework import viewsets
from rest_framework.response import Response
from rest_framework import status
from django_filters.rest_framework import DjangoFilterBackend
import json
from newsAPI.models import News, NewsHistory
from newsAPI.serializers import NewsSerializer, NewsHistorySerializer
from newsAPI.filter import NewsFilter, NewsHistoryFilter


class NewsViewSet(viewsets.ModelViewSet):
    queryset = News.objects.all()
    serializer_class = NewsSerializer
    filter_class = NewsFilter


class NewHistoryViewSet(viewsets.ModelViewSet):
    queryset = NewsHistory.objects.all()
    serializer_class = NewsHistorySerializer
    filter_fields = 'id', 'news'

from rest_framework import viewsets
from rest_framework.response import Response
from rest_framework import status
from django_filters.rest_framework import DjangoFilterBackend
import json

# Create your views here.
from newsAPI.models import News, NewsHistory
from newsAPI.serializers import NewsSerializer, NewsHistorySerializer
from newsAPI.filter import NewsFilter, NewsHistoryFilter

class NewsViewSet(viewsets.ModelViewSet):
  queryset = News.objects.all()
  serializer_class = NewsSerializer
  filter_class = NewsFilter
  

class NewHistoryViewSet(viewsets.ModelViewSet):
  queryset = NewsHistory.objects.all()
  serializer_class = NewsHistorySerializer
  # filter_class = NewsHistoryFilter
  filter_fields = ('id', 'news')