class ImagesForSliderSerializer(serializers.ModelSerializer):
class Meta:
model = ImagesForSlider
fields = ('id', 'image', 'image_name')
class GroupSerializer(serializers.ModelSerializer):
images_for_slider = ImagesForSliderSerializer(many=True)
class Meta:
model = Group
fields = (
# ...
'images_for_slider',
)