API : ajout des jeux (nom et plateforme)

This commit is contained in:
2017-09-16 21:37:36 +02:00
parent b0978034b5
commit 8dec41073f
6 changed files with 87 additions and 6 deletions

View File

@ -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 = [