Когда пишу python manage.py makemigrations он мне выдает
You are trying to add a non-nullable field 'author' to review without a default; we can't do that (the d
atabase needs something to populate existing rows).
Please select a fix:
1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
2) Quit, and let me add a default in models.py
Select an option:
Вот сам код:
class Review(models.Model):
author = models.CharField(max_length=100)
text = models.CharField(max_length=100)
movie = models.ForeignKey(Movie, on_delete=models.CASCADE)
def __str__(self):
return self.author