Skip to content

Commit

Permalink
Merge pull request #11 from VictorGM01/corrige-erro-de-valor-default
Browse files Browse the repository at this point in the history
Corrige valor default do campo de data
  • Loading branch information
VictorGM01 authored Dec 26, 2022
2 parents 7988c44 + b9dafbf commit 506ea8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Generated by Django 4.0.1 on 2022-12-26 21:56
# Generated by Django 4.0.1 on 2022-12-26 22:29

import datetime
from django.db import migrations, models
from django.utils.timezone import utc
import django.utils.timezone


class Migration(migrations.Migration):
Expand All @@ -19,6 +18,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='tarefa',
name='data_de_conclusao',
field=models.DateField(blank=True, default=datetime.datetime(2022, 12, 26, 21, 56, 30, 797309, tzinfo=utc), null=True),
field=models.DateField(blank=True, default=django.utils.timezone.now, null=True),
),
]
20 changes: 0 additions & 20 deletions to_do_list/migrations/0004_alter_tarefa_data_de_conclusao.py

This file was deleted.

2 changes: 1 addition & 1 deletion to_do_list/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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=timezone.now, blank=True, null=True)
concluida = models.BooleanField(default=False)
descricao = models.TextField(max_length=500, blank=True)

Expand Down

0 comments on commit 506ea8c

Please sign in to comment.