from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User


class Tarefa(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    titulo = models.CharField(max_length=200)
    descricao = models.TextField()
    estado = models.CharField(max_length=10, default="Afazer")
    dtcriacao = models.DateTimeField(default=timezone.now)
    dtprazo = models.DateTimeField(default=timezone.now)
    dtconcluzao = models.DateTimeField(null=True)


    def __str__(self):
        return self.titulo + " - " + self.estado

da6f5d997e0502dcc0aa45f27c671ba58eb10989
<mask token>


class Tarefa(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Tarefa(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self):
        return self.titulo + ' - ' + self.estado

<mask token>


class Tarefa(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    titulo = models.CharField(max_length=200)
    descricao = models.TextField()
    estado = models.CharField(max_length=10, default='Afazer')
    dtcriacao = models.DateTimeField(default=timezone.now)
    dtprazo = models.DateTimeField(default=timezone.now)
    dtconcluzao = models.DateTimeField(null=True)

    def __str__(self):
        return self.titulo + ' - ' + self.estado

from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User


class Tarefa(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    titulo = models.CharField(max_length=200)
    descricao = models.TextField()
    estado = models.CharField(max_length=10, default='Afazer')
    dtcriacao = models.DateTimeField(default=timezone.now)
    dtprazo = models.DateTimeField(default=timezone.now)
    dtconcluzao = models.DateTimeField(null=True)

    def __str__(self):
        return self.titulo + ' - ' + self.estado

from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User


class Tarefa(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    titulo = models.CharField(max_length=200)
    descricao = models.TextField()
    estado = models.CharField(max_length=10, default="Afazer")
    dtcriacao = models.DateTimeField(default=timezone.now)
    dtprazo = models.DateTimeField(default=timezone.now)
    dtconcluzao = models.DateTimeField(null=True)


    def __str__(self):
        return self.titulo + " - " + self.estado
