InfoTech-Backend/infotech/daytimes/serializers.py

11 lines
335 B
Python
Raw Permalink Normal View History

2023-04-22 14:07:08 +08:00
from rest_framework import serializers
from django.contrib.auth.models import User
from .models import DayTime
class DayTimeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = DayTime
fields = ('id', 'name', 'day', 'time_start', 'time_end')
read_only_fields = ['id', 'name']