Let's see whether you can answer the following questions correctly:
- The @api_view decorator declared in the rest_framework.decorators module allows you to:
- Specify which is the model related to the function based view
- Specify which are the HTTP verbs that the function based view to which it is applied can process
- Specify which is the serializer related to the function based view
- The @api_view decorator is a wrapper that converts a function based view into a subclass of which of the following classes:
- django.Http.Response.HttpResponse
- rest_framework.views.APIView
- rest_framework.serializers.Serializer
- Which of the following settings key in the REST_FRAMEWORK dictionary allows you to override the global setting with a tuple of string whose values indicate the default classes that you want to use for parsing backends:
- 'DEFAULT_PARSER_CLASSES'
- 'GLOBAL_PARSER_CLASSES'
- 'REST_FRAMEWORK_PARSING_CLASSES'
- Which of the following classes is able to parse application/json content type when we work with the @api_view decorator and its default settings:
- django.parsers.JSONParser
- rest_framework.classes.JSONParser
- rest_framework.parsers.JSONParser
- Which of the following classes is able to parse application/x-www-form-urlencoded content type when we work with the @api_view decorator and its default settings:
- django.parsers.XWWWUrlEncodedParser
- rest_framework.classes.XWWWUrlEncodedParser
- rest_framework.parsers.FormParser
The rights answers are included in the Appendix, Solutions.