from rest_framework import serializers
from django.contrib.auth.models import User
from tasks.models import Task


class UserSerializer(serializers.ModelSerializer):


    class Meta:
        model = User
        fields = ['username', 'email']


class TaskSerializer(serializers.ModelSerializer):
    user = UserSerializer(read_only=True)


    class Meta:
        model = Task
        fields = '__all__'
        depth = 1

1176e779c7b7e2fc6d93f1af7c844636de9d0735
<mask token>


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


    class Meta:
        model = Task
        fields = '__all__'
        depth = 1

<mask token>


class TaskSerializer(serializers.ModelSerializer):
    user = UserSerializer(read_only=True)


    class Meta:
        model = Task
        fields = '__all__'
        depth = 1

<mask token>


class UserSerializer(serializers.ModelSerializer):


    class Meta:
        model = User
        fields = ['username', 'email']


class TaskSerializer(serializers.ModelSerializer):
    user = UserSerializer(read_only=True)


    class Meta:
        model = Task
        fields = '__all__'
        depth = 1

from rest_framework import serializers
from django.contrib.auth.models import User
from tasks.models import Task


class UserSerializer(serializers.ModelSerializer):


    class Meta:
        model = User
        fields = ['username', 'email']


class TaskSerializer(serializers.ModelSerializer):
    user = UserSerializer(read_only=True)


    class Meta:
        model = Task
        fields = '__all__'
        depth = 1
