mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2024-11-16 22:19:25 +08:00
12 lines
367 B
Python
12 lines
367 B
Python
from rest_framework import serializers
|
|
from django.contrib.auth.models import User
|
|
from .models import Subject
|
|
from students.models import Student
|
|
|
|
|
|
class SubjectSerializer(serializers.HyperlinkedModelSerializer):
|
|
|
|
class Meta:
|
|
model = Subject
|
|
fields = ('id', 'name', 'code', 'year_level', 'semester')
|
|
read_only_fields = ['id']
|