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

Solution #414

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

Solution #414

wants to merge 5 commits into from

Conversation

MiskoRuslan
Copy link

No description provided.

cinema/urls.py Outdated
Comment on lines 4 to 10
from cinema.views import (GenreList,
GenreDetail,
ActorList,
ActorDetail,
CinemaHallViewSet,
MovieViewSet
)
Copy link

Choose a reason for hiding this comment

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

a little mistake, u must write:

from cinema.views import (
GenreList,
...
MovieViewSet
)

or:

...import (GenreList,
...
MovieViewSet)

cinema/models.py Outdated
class Movie(models.Model):
title = models.CharField(max_length=255)
description = models.TextField()
duration = models.IntegerField()
actors = models.ManyToManyField(Actor)
Copy link
Contributor

Choose a reason for hiding this comment

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

it's always a good idea to add related_name

cinema/views.py Outdated

if request.method == "POST":
serializer = MovieSerializer(data=request.data)
def post(self, request) -> Response:
Copy link
Contributor

Choose a reason for hiding this comment

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

annotate request as well, keep your project one-styled

Copy link
Contributor

@Y-Havryliv Y-Havryliv left a comment

Choose a reason for hiding this comment

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

gj!

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.

3 participants