# coding=utf-8

from django.contrib.auth.models import User

from rest_framework import serializers

from todo.models import TodoTarea


class RegistroSerializer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = ("username", "password")
        write_only_fields = ("password",)


class TareasSerializer(serializers.ModelSerializer):
    class Meta:
        model = TodoTarea
        fields = ("id", "titulo", "descripcion", "realizada")
        read_only_fields = ("id", "asignado", "ultima_actualizacion")
        write_only_fields = ("titulo", "descripcion")

# coding=utf-8

from django.contrib.auth.models import User

from rest_framework import serializers

from todo.models import TodoTarea


class RegistroSerializer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = ("username", "password")
        write_only_fields = ("password",)


class TareasSerializer(serializers.ModelSerializer):
    class Meta:
        model = TodoTarea
        fields = ("id", "titulo", "descripcion", "realizada")
        read_only_fields = ("id", "asignado", "ultima_actualizacion")
        write_only_fields = ("titulo", "descripcion")

# coding=utf-8