-
Notifications
You must be signed in to change notification settings - Fork 731
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 #673
base: master
Are you sure you want to change the base?
Solution #673
Conversation
cinema/models.py
Outdated
@@ -5,6 +5,23 @@ class Movie(models.Model): | |||
title = models.CharField(max_length=255) | |||
description = models.TextField() | |||
duration = models.IntegerField() | |||
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.
add related name plz
cinema/models.py
Outdated
@@ -5,6 +5,23 @@ class Movie(models.Model): | |||
title = models.CharField(max_length=255) | |||
description = models.TextField() | |||
duration = models.IntegerField() | |||
genres = models.ManyToManyField("Genre") | |||
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.
and here too
cinema/views.py
Outdated
movie.delete() | ||
return Response(status=status.HTTP_204_NO_CONTENT) | ||
class ActorList( | ||
mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericAPIView |
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.
bad formatting
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.
Your code doesn't follow the DRY principle. Please consider removing unnecessary code.
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.
Your code doesn't follow the DRY principle. Please consider removing unnecessary code.
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.
Thanks
No description provided.