-
Notifications
You must be signed in to change notification settings - Fork 729
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 #396
base: master
Are you sure you want to change the base?
Solution #396
Conversation
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.
good jobs
cinema/urls.py
Outdated
cinema_hall_list = CinemaHallViewSet.as_view(actions={"get": "list", | ||
"post": "create"}) | ||
cinema_hall_detail = CinemaHallViewSet.as_view( | ||
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.
2 different ways of formatting is not really good. Choose one and use it everywhere. ( I prefer second one, but it is up to you )
cinema/urls.py
Outdated
path("cinema_halls/<int:pk>/", | ||
cinema_hall_detail, | ||
name="cinema_hall-detail"), | ||
path("", include(router.urls)) |
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 not a reason for reject, but it is better to put a general path in the beginning
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.
tried path("/", include(router.urls))
but got some failed tests, so didn't add this to final commit
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.
i meant just to move path("", include(router.urls))
to the beginning:)
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.
got it)
cinema/urls.py
Outdated
path("genres/<int:pk>/", GenreDetail.as_view(), name="genre-detail"), | ||
path("actors/", ActorList.as_view(), name="actor-list"), | ||
path("actors/<int:pk>/", ActorDetail.as_view(), name="actor-detail"), | ||
path("cinema_halls/", cinema_hall_list, name="cinema_hall-list"), |
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.
use _
or -
, don't mix it together
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.
copy-paste type of issue 😁. fixed
cinema/views.py
Outdated
from rest_framework.views import APIView | ||
from cinema.serializers import (MovieSerializer, |
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.
blank line between groups of imports?
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.