mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2024-11-17 06:29:26 +08:00
17 lines
610 B
Python
17 lines
610 B
Python
from rest_framework import serializers
|
|
from django.contrib.auth.models import User
|
|
from .models import Student
|
|
|
|
|
|
class StudentSerializer(serializers.HyperlinkedModelSerializer):
|
|
|
|
class Meta:
|
|
model = Student
|
|
fields = ['id', 'first_name', 'middle_name', 'last_name',
|
|
'age', 'sex', 'birthdate',
|
|
'address', 'birthplace',
|
|
'mother_name', 'father_name',
|
|
'registrar_done', 'clearance_done', 'pta_done',
|
|
'enrolled_subjects', 'year_level'
|
|
]
|
|
read_only_fields = ['id']
|