urls.py 345 B

12345678910111213
  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
  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. ]