mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2024-11-17 06:29:26 +08:00
11 lines
366 B
Python
11 lines
366 B
Python
|
from rest_framework.permissions import IsAuthenticated
|
||
|
from rest_framework import viewsets
|
||
|
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')
|