Answer the question
In order to leave comments, you need to log in
Why is Django asking me for a default date even if blank=True?
I command: makemigrations, and asks to enter the default setting. I ask myself: what for is she to you? I write blank = True. But history repeats itself. A little angry, I wrote: default = 'Error: the date is not found'. Makemigrations ate it, but migrate was offended and writes me that I entered the wrong date! Of course! I write blank=True again, but now makemigrations doesn't want to listen to me at all, and migrate is convinced that I'm still trying to silence the above line as a date. But I don’t understand what the hell I did x) Help someone with what you can, we ourselves are not local!
class Album(models.Model):
name = models.CharField(max_length=35)
date = models.DateTimeField()
def __str__(self):
return self.name
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question