-
Notifications
You must be signed in to change notification settings - Fork 722
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
base: master
Are you sure you want to change the base?
Solution #414
Conversation
cinema/urls.py
Outdated
from cinema.views import (GenreList, | ||
GenreDetail, | ||
ActorList, | ||
ActorDetail, | ||
CinemaHallViewSet, | ||
MovieViewSet | ||
) |
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.
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) |
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'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: |
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.
annotate request as well, keep your project one-styled
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.
gj!
No description provided.