API : ajout des jeux (nom et plateforme)
This commit is contained in:
@ -16,7 +16,7 @@ Including another URLconf
|
||||
from django.conf.urls import url, include
|
||||
from django.contrib import admin
|
||||
from collection import __version__ as app_version
|
||||
from games.views import GameList, PlatformViewSet
|
||||
from games.views import GameList, GameViewSet, PlatformViewSet
|
||||
from rest_framework import routers
|
||||
from rest_framework.documentation import include_docs_urls
|
||||
|
||||
@ -26,6 +26,7 @@ admin.site.site_header = '%s %s' % (admin.site.site_title, app_version)
|
||||
|
||||
# Django Rest Framework router
|
||||
router = routers.DefaultRouter()
|
||||
router.register(r'games', GameViewSet)
|
||||
router.register(r'platforms', PlatformViewSet)
|
||||
|
||||
urlpatterns = [
|
||||
|
Reference in New Issue
Block a user