-
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 #392
base: master
Are you sure you want to change the base?
Solution #392
Conversation
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, |
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.
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", |
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 is better do this like that:
actions = {
"get": "retrieve",
"put": "update",
"patch": "partial_update",
"delete": "destroy"
}
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.