mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2025-01-19 07:13:04 +08:00
11 lines
376 B
Python
11 lines
376 B
Python
|
from rest_framework.permissions import IsAuthenticated
|
||
|
from rest_framework import viewsets
|
||
|
from .serializers import ProfessorSerializer
|
||
|
from .models import Professor
|
||
|
|
||
|
|
||
|
class ProfessorViewSet(viewsets.ModelViewSet):
|
||
|
# permission_classes = [IsAuthenticated]
|
||
|
serializer_class = ProfessorSerializer
|
||
|
queryset = Professor.objects.all().order_by('date_joined')
|