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 #673

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

Solution #673

wants to merge 7 commits into from

Conversation

DSahalatyi
Copy link

No description provided.

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")

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")

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

Choose a reason for hiding this comment

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

bad formatting

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.

Your code doesn't follow the DRY principle. Please consider removing unnecessary code.

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.

Your code doesn't follow the DRY principle. Please consider removing unnecessary code.

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.

Thanks

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