mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2024-11-17 06:29:26 +08:00
11 lines
335 B
Python
11 lines
335 B
Python
|
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']
|