10π
β
It should be models.DateField
with a capital F
.
So your Books
model should look like this:
class Books(models.Model):
title = models.CharField(max_length=100)
authors = models.ManyToManyField(Author)
publishers = models.ForeignKey(Publisher)
publication_date = models.DateField() # <--- Typo was here
π€Shawn Chin
Source:stackexchange.com