-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6279fb
commit d57a7bc
Showing
4 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ | |
admin.site.register(Genre) | ||
admin.site.register(CinemaHall) | ||
admin.site.register(Movie) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
from django.urls import path, include | ||
from rest_framework.routers import DefaultRouter | ||
from .views import GenreAPIView, ActorListCreateView, ActorDetailView, CinemaHallViewSet, MovieViewSet | ||
from .views import GenreAPIView, \ | ||
ActorListCreateView, ActorDetailView, CinemaHallViewSet, MovieViewSet | ||
|
||
app_name = 'cinema' # Set the app_name here | ||
app_name = "cinema" # Set the app_name here | ||
|
||
router = DefaultRouter() | ||
router.register(r'movies', MovieViewSet) | ||
router.register(r'cinema_halls', CinemaHallViewSet) | ||
router.register(r"movies", MovieViewSet) | ||
router.register(r"cinema_halls", CinemaHallViewSet) | ||
|
||
urlpatterns = [ | ||
path('genres/', GenreAPIView.as_view(), name='genre-list'), | ||
path('actors/', ActorListCreateView.as_view(), name='actor-list'), | ||
path('actors/<int:pk>/', ActorDetailView.as_view(), name='actor-detail'), | ||
path('', include(router.urls)), | ||
path("genres/", GenreAPIView.as_view(), name="genre-list"), | ||
path("actors/", ActorListCreateView.as_view(), name="actor-list"), | ||
path("actors/<int:pk>/", ActorDetailView.as_view(), name="actor-detail"), | ||
path("", include(router.urls)), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters