1
I am programming an agenda, and for that, I created the model "Commitment", which has the following code:
class Compromisso(models.Model):
nome = models.CharField(max_length=100, verbose_name="Nome")
descricao = models.TextField(verbose_name="Descrição")
data_criacao = models.DateField(default=datetime.today, blank=True, verbose_name="Data de criação")
prazo_cumprimento = models.DateField(DateInput)
Migrations have already been performed and changed, and the verbose_name that Django set as the default for the "prazo_cumprimento" field was django.forms.widgets.DateInput
. When I make the argument verbose_name="Prazo de cumprimento"
and I try to make the migration, that mistake happens:
TypeError: __init__() got multiple values for argument 'verbose_name'
How can I fix this?
I understand, it is my first time dealing with dates in models and I ended up getting confused. Thank you very much!
– Carlos
It worked, here. Again, thank you!
– Carlos