from rest_framework import serializers
from .models import User, Userprofile, Servicelog


class UserprofileSerializer(serializers.ModelSerializer):
    user = serializers.ReadOnlyField(source='user.username')


    class Meta:
        model = Userprofile
        fields = ['user', 'height', 'weight', 'age', 'exc_lvl', 'gender']


class ServiceSerializer(serializers.ModelSerializer):


    class Meta:
        model = Servicelog
        fields = ['count', 'timestamp']

096f7831bef20ffc3d7f7f2632c5c5e54edfbd8f
<mask token>


class ServiceSerializer(serializers.ModelSerializer):


    class Meta:
        model = Servicelog
        fields = ['count', 'timestamp']

<mask token>


class UserprofileSerializer(serializers.ModelSerializer):
    <mask token>


    class Meta:
        model = Userprofile
        fields = ['user', 'height', 'weight', 'age', 'exc_lvl', 'gender']


class ServiceSerializer(serializers.ModelSerializer):


    class Meta:
        model = Servicelog
        fields = ['count', 'timestamp']

<mask token>


class UserprofileSerializer(serializers.ModelSerializer):
    user = serializers.ReadOnlyField(source='user.username')


    class Meta:
        model = Userprofile
        fields = ['user', 'height', 'weight', 'age', 'exc_lvl', 'gender']


class ServiceSerializer(serializers.ModelSerializer):


    class Meta:
        model = Servicelog
        fields = ['count', 'timestamp']

from rest_framework import serializers
from .models import User, Userprofile, Servicelog


class UserprofileSerializer(serializers.ModelSerializer):
    user = serializers.ReadOnlyField(source='user.username')


    class Meta:
        model = Userprofile
        fields = ['user', 'height', 'weight', 'age', 'exc_lvl', 'gender']


class ServiceSerializer(serializers.ModelSerializer):


    class Meta:
        model = Servicelog
        fields = ['count', 'timestamp']
