mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2025-05-16 11:28:14 +08:00
Finalized schedule and student model by adding relationship between both
This commit is contained in:
parent
716b7cf348
commit
0169d69914
4 changed files with 30 additions and 19 deletions
|
@ -8,7 +8,7 @@ from subjects.models import Subject
|
|||
|
||||
class StudentSerializer(serializers.HyperlinkedModelSerializer):
|
||||
schedules = serializers.SlugRelatedField(
|
||||
queryset=Subject.objects.all(), slug_field='name', allow_null=True)
|
||||
queryset=Subject.objects.all(), many=True, slug_field='name', allow_null=True)
|
||||
|
||||
class Meta:
|
||||
model = Student
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue