-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
f #514
f #514
Conversation
services/movie.py
Outdated
return queryset | ||
|
||
|
||
def get_movie_by_id(movie_id: int) -> QuerySet[Movie]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It returns one Movie, not queryset
services/movie.py
Outdated
movie_description: str, | ||
genres_ids: list[int] = None, | ||
actors_ids: list[int] = None | ||
) -> QuerySet[Movie]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It returns Movie
services/movie_session.py
Outdated
movie_show_time: datetime.datetime, | ||
movie_id: int, | ||
cinema_hall_id: int | ||
) -> QuerySet[MovieSession]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it returns MovieSession
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix in all places
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('db', '0001_initial'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change ' to ", use Black
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but theres no need to change migrations. I thought that it
s better to let django make migrations
Co-authored-by: Vasyl Hnatiuk <[email protected]>
db/models.py
Outdated
title = models.CharField(max_length=255) | ||
description = models.TextField() | ||
actors = models.ManyToManyField(Actor, related_name="actors") | ||
genres = models.ManyToManyField(Genre, related_name="genres") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong related name
db/models.py
Outdated
class Movie(models.Model): | ||
title = models.CharField(max_length=255) | ||
description = models.TextField() | ||
actors = models.ManyToManyField(Actor, related_name="actors") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong related name
db/models.py
Outdated
class Movie(models.Model): | ||
title = models.CharField(max_length=255) | ||
description = models.TextField() | ||
actors = models.ManyToManyField(Actor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actors = models.ManyToManyField(Actor) | |
actors = models.ManyToManyField(Actor, related_name="movies") |
db/models.py
Outdated
title = models.CharField(max_length=255) | ||
description = models.TextField() | ||
actors = models.ManyToManyField(Actor) | ||
genres = models.ManyToManyField(Genre) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
genres = models.ManyToManyField(Genre) | |
genres = models.ManyToManyField(Genre, related_name="movies") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.