diff --git a/cinema/models.py b/cinema/models.py index b5fcb9e0..61795c8d 100644 --- a/cinema/models.py +++ b/cinema/models.py @@ -28,9 +28,9 @@ def __str__(self): class Movie(models.Model): title = models.CharField(max_length=200) description = models.TextField() - actors = models.ManyToManyField(Actor) - genres = models.ManyToManyField(Genre) - duration = models.DurationField() + duration = models.IntegerField() + actors = models.ManyToManyField("Actor", related_name="movies") + genres = models.ManyToManyField("Genre", related_name="movies") def __str__(self): return self.title