Using the default parsing and rendering options and move beyond JSON

The APIView class specifies default settings for each view that we can override by specifying appropriate values in the gamesapi/ file or by overriding the class attributes in subclasses. As previously explained, the usage of the APIView class under the hoods makes the decorator apply these default settings. Thus, whenever we use the decorator, the default parser classes and the default renderer classes will be associated with the function views.

By default, the value for the DEFAULT_PARSER_CLASSES is the following tuple of classes:


When we use the decorator, ...

Get Building RESTful Python Web Services now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.