123456789101112131415161718192021222324252627282930313233343536373839404142 |
- from django.urls import include, path
- from games.api.views import GameViewSet
- from rest_framework import routers
- # importing views from views..py
- import games.views as views
- app_name = "games"
- urlpatterns = [
- path(
- "",
- views.GameList.as_view(),
- name="game_list",
- ),
- path(
- "<str:slug>/",
- views.GameDetail.as_view(),
- name="game_detail",
- ),
- path(
- "<str:slug>/play/",
- views.GamePlayDetail.as_view(),
- name="game_play_detail",
- ),
- path(
- "system/<str:slug>/",
- views.GameSystemDetail.as_view(),
- name="game_system_detail",
- ),
- path("genre/<str:slug>/", views.GenreDetail.as_view(), name="genre_detail"),
- path(
- "publisher/<str:slug>/",
- views.PublisherDetail.as_view(),
- name="publisher_detail",
- ),
- path(
- "developer/<str:slug>/",
- views.DeveloperDetail.as_view(),
- name="developer_detail",
- ),
- ]
|