December 2018
Intermediate to advanced
500 pages
12h 33m
English
We want to be able to list all the users and retrieve the details for a single user. We will create subclasses of the two following generic class views declared in the rest_framework.generics module:
Open the views.py file in the games_service/games folder. Add the following code after the last line that declares the imports, before the declaration of the GameCategoryList class. The code file for the sample is included in the restful_python_2_07_04 folder, in the Django01/games-service/games/views.py file:
from django.contrib.auth.models ...