17 lines
463 B
Python
17 lines
463 B
Python
from rest_framework import serializers
|
|
from .models import GymProgram
|
|
from server.user.serializers import CustomUserDetailsSerializer
|
|
|
|
|
|
class GymProgramSerializer(serializers.ModelSerializer):
|
|
users = CustomUserDetailsSerializer(many=True, read_only=True)
|
|
|
|
class Meta:
|
|
model = GymProgram
|
|
fields = ('id',
|
|
'name',
|
|
'description',
|
|
'duration',
|
|
'users'
|
|
)
|