mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2024-11-17 06:29:26 +08:00
13 lines
441 B
Python
13 lines
441 B
Python
from rest_framework import serializers
|
|
from .models import Schedule
|
|
|
|
|
|
class ScheduleSerializer(serializers.HyperlinkedModelSerializer):
|
|
date_created = serializers.DateTimeField(
|
|
format="%d-%m-%Y %I:%M%p", read_only=True)
|
|
|
|
class Meta:
|
|
model = Schedule
|
|
fields = ('id', 'subject', 'students_assigned',
|
|
'professor', 'date_created')
|
|
read_only_fields = ('id', 'date_created')
|