InfoTech-Backend/infotech/schedules/views.py

20 lines
657 B
Python
Raw Normal View History

from django.shortcuts import render
# Create your views here.
from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets
2023-04-22 11:59:16 +08:00
from .serializers import ScheduleSerializer, StudentScheduleSerializer
from .models import Schedule, StudentSchedule
class ScheduleViewSet(viewsets.ModelViewSet):
# permission_classes = [IsAuthenticated]
serializer_class = ScheduleSerializer
queryset = Schedule.objects.all()
2023-04-22 11:59:16 +08:00
class StudentScheduleViewSet(viewsets.ModelViewSet):
# permission_classes = [IsAuthenticated]
serializer_class = StudentScheduleSerializer
queryset = StudentSchedule.objects.all()