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

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

Conversation

mykolamateichuk
Copy link

No description provided.

Copy link

@kostomeister kostomeister left a 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
Comment on lines 12 to 19
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"}
)
Copy link

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))
Copy link

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

Copy link
Author

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

Copy link

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

Copy link
Author

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"),
Copy link

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

Copy link
Author

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
Comment on lines 11 to 12
from rest_framework.views import APIView
from cinema.serializers import (MovieSerializer,
Copy link

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?

Copy link

@wQuelS wQuelS 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