Example #1
0
class WorkoutCanonicalFormExerciseListSerializer(serializers.Serializer):
    '''
    Serializer for settings in the canonical form of a workout
    '''
    setting_obj_list = SettingSerializer(many=True)
    setting_list = serializers.ReadOnlyField()
    reps_list = serializers.ReadOnlyField()
    has_weight = serializers.ReadOnlyField()
    weight_list = serializers.ReadOnlyField()
    setting_text = serializers.ReadOnlyField()
    comment_list = serializers.ReadOnlyField()
    obj = ExerciseSerializer()
Example #2
0
class WorkoutCanonicalFormExerciseListSerializer(serializers.Serializer):
    """
    Serializer for settings in the canonical form of a workout
    """
    setting_obj_list = SettingSerializer(many=True)
    setting_list = serializers.ReadOnlyField()
    reps_list = serializers.ReadOnlyField()
    has_weight = serializers.ReadOnlyField()
    weight_list = serializers.ReadOnlyField()
    setting_text = serializers.ReadOnlyField()
    repetition_units = RepetitionUnitSerializer(many=True)
    weight_units = WeightUnitSerializer(many=True)
    comment_list = serializers.ReadOnlyField()
    obj = ExerciseSerializer()
Example #3
0
class WorkoutCanonicalFormExerciseListSerializer(serializers.Serializer):
    """
    Serializer for settings in the canonical form of a workout
    """
    setting_obj_list = SettingSerializer(many=True)
    setting_list = serializers.ReadOnlyField()
    reps_list = serializers.ReadOnlyField()
    has_weight = serializers.ReadOnlyField()
    weight_list = serializers.ReadOnlyField()
    setting_text = serializers.ReadOnlyField()
    settings_calculated = serializers.ReadOnlyField()
    comment_list = serializers.ReadOnlyField()
    image_list = WorkoutCanonicalFormExerciseImagesListSerializer(many=True)
    obj = ExerciseSerializer()