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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Solution #709

wants to merge 1 commit into from

Conversation

yulia-pl
Copy link

No description provided.

self.permission_classes = [IsAdminUser]
else:
self.permission_classes = [IsAuthenticated]
return super().get_permissions()

Choose a reason for hiding this comment

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

As I understand task, you already have implemented IsAdminORIfAuthenticatedReadOnly. That's the same what you wrote in def get_permissions. So like python dev - probably should just wrote permission_classes = (IsAdminOrIfAuthenticatedReadOnly,) and no need to write for every ViewSet +7 code lines, just add one attribute.

Copy link

@serhiik05 serhiik05 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 worked, but next time should write it in more simple way

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on implementing the cinema application! 🎉 Your code meets the task requirements and follows best practices. While there are a couple of minor issues, such as missing blank lines at the end of files and redundant files, they don't impact the core functionality. Keep up the good work, and consider addressing these minor points to enhance your code quality even further. Well done! 👍

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

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