urls.py 450 B

1234567891011121314
  1. from django.urls import include, path
  2. from games.api.views import GameViewSet
  3. from rest_framework import routers
  4. # importing views from views..py
  5. from .views import GameList, GameDetail, GameSystemDetail
  6. app_name = "games"
  7. urlpatterns = [
  8. path("", GameList.as_view(), name="game_list"),
  9. path("<str:slug>/", GameDetail.as_view(), name="game_detail"),
  10. path("system/<str:slug>/", GameSystemDetail.as_view(), name="game_system_detail"),
  11. ]