Skip to content
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

sol_1 #654

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

sol_1 #654

wants to merge 2 commits into from

Conversation

Narberal90
Copy link

No description provided.

Copy link

@mnezbrytska mnezbrytska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You get extra points for validation)

@@ -68,13 +78,66 @@ class Meta:
"movie_title",
"cinema_hall_name",
"cinema_hall_capacity",
"tickets_available",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this empty line

Comment on lines 93 to 94
movie = MovieListSerializer(many=False, read_only=True)
cinema_hall = CinemaHallSerializer(many=False, read_only=True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

many is by default False

order = Order.objects.create(**validated_data)
for ticket_data in tickets_data:
Ticket.objects.create(order=order, **ticket_data)
return order

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In create/update/delete function you don't need to return anything

cinema/views.py Outdated
queryset = queryset.filter(actors__id__in=actors)
if title:
queryset = queryset.filter(title__icontains=title)
return queryset

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be good also to use distinct

Copy link

@Arsen-hrynevych Arsen-hrynevych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants