Skip to content

Commit

Permalink
Merge pull request #17 from VictorGM01/corrige-valor-da-data
Browse files Browse the repository at this point in the history
Corrige valor da data
  • Loading branch information
VictorGM01 authored Jan 5, 2023
2 parents f3fe870 + 80ceac3 commit b6a16a4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions to_do_list/migrations/0004_alter_tarefa_data_de_conclusao.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.1.5 on 2023-01-05 15:59

import datetime
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('to_do_list', '0003_remove_tarefa_data_tarefa_data_de_conclusao'),
]

operations = [
migrations.AlterField(
model_name='tarefa',
name='data_de_conclusao',
field=models.DateField(blank=True, default=datetime.date.today, null=True),
),
]
4 changes: 2 additions & 2 deletions to_do_list/models.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from django.db import models
from django.utils import timezone
from datetime import date


class Tarefa(models.Model):
titulo = models.CharField(max_length=100)
data_de_conclusao = models.DateField(default=timezone.now, blank=True, null=True)
data_de_conclusao = models.DateField(default=date.today, blank=True, null=True)
concluida = models.BooleanField(default=False)
descricao = models.TextField(max_length=500, blank=True)

Expand Down

0 comments on commit b6a16a4

Please sign in to comment.