Let's see whether you can answer the following questions correctly:
- Under the hood, the @api_view decorator is:
- A wrapper that converts a function-based view into a subclass of the rest_framework.views.APIView class
- A wrapper that converts a function-based view into a serializer
- A wrapper that converts a function-based view into a subclass of the rest_framework.views.api_view class
- The Serializer and ModelSerializer classes in Django REST Framework are similar to which of the following two classes in Django Web framework?
- Form and ModelForm
- View and ModelView
- Controller and ModelController
- Which of the following classes is a read-write field that represents the target of the relationship by a unique slug attribute, that is, the description?
- SlugLinkedField
- HyperlinkedRelatedField
- SlugRelatedField
- Which of the following classes renders the URL for a related object?
- SlugLinkedField
- HyperlinkedRelatedField
- SlugRelatedField
- The browsable API is a feature included in Django REST Framework that:
- Generates human-friendly JSON output for each resource whenever the request specifies application/json as the value for the Content-type key in the request header
- Generates human-friendly HTML output for each resource whenever the request specifies text/html as the value for the Content-type key in the request header
- . Generates human-friendly HTML output for each resource whenever the request specifies application/json as the value for the Content-type key in the request header