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

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

Solution #392

wants to merge 3 commits into from

Conversation

vshvanska
Copy link

No description provided.

cinema/urls.py Outdated
from django.urls import path
from django.urls import path, include
from rest_framework import routers
from cinema.views import (MovieViewSet, GenreList,

Choose a reason for hiding this comment

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

Group imports using () if needed.
Good example:

from django.contrib.auth.mixins import (
LoginRequiredMixin,
UserPassesTestMixin,
PermissionRequiredMixin,
)
Another bad example:

from django.contrib.auth.mixins import (
LoginRequiredMixin,
UserPassesTestMixin, PermissionRequiredMixin,
)
look checklist

cinema/urls.py Outdated
cinemahall_list = CinemaHallViewSet.as_view(
actions={"get": "list", "post": "create"})
cinemahall_detail = CinemaHallViewSet.as_view(
actions={"get": "retrieve", "put": "update",

Choose a reason for hiding this comment

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

it is better do this like that:
actions = {
"get": "retrieve",
"put": "update",
"patch": "partial_update",
"delete": "destroy"
}

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