mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2024-11-17 06:29:26 +08:00
19 lines
657 B
Python
19 lines
657 B
Python
from django.shortcuts import render
|
|
|
|
# Create your views here.
|
|
from rest_framework.permissions import IsAuthenticated
|
|
from rest_framework import viewsets
|
|
from .serializers import ScheduleSerializer, StudentScheduleSerializer
|
|
from .models import Schedule, StudentSchedule
|
|
|
|
|
|
class ScheduleViewSet(viewsets.ModelViewSet):
|
|
# permission_classes = [IsAuthenticated]
|
|
serializer_class = ScheduleSerializer
|
|
queryset = Schedule.objects.all()
|
|
|
|
|
|
class StudentScheduleViewSet(viewsets.ModelViewSet):
|
|
# permission_classes = [IsAuthenticated]
|
|
serializer_class = StudentScheduleSerializer
|
|
queryset = StudentSchedule.objects.all()
|