InfoTech-Backend/infotech/subjects/views.py

10 lines
376 B
Python

from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets, generics
from .serializers import SubjectSerializer
from .models import Subject
class SubjectViewSet(viewsets.ModelViewSet):
# permission_classes = [IsAuthenticated]
serializer_class = SubjectSerializer
queryset = Subject.objects.all().order_by('-year_level')