Building REST APIs with Django Rest Framework

Check your understanding of serializers,viewsets,and authentication in DRF.

1. Django Rest Framework is built on top of which web framework?
2. Which DRF component converts complex data types (e.g., Django models) into native Python types for rendering into JSON?
3. Which DRF class provides built-in CRUD actions (list, create, retrieve, update, delete) for a model?
4. What is the default response format for DRF APIs?
5. Which decorator adds a custom action to a ViewSet (e.g., a 'like' endpoint for a PostViewSet)?
6. Which HTTP status code should a successful POST request returning a new resource use?
7. What is the role of DRF permission classes?
8. Which DRF serializer auto-generates fields and validators from a Django model?
9. Select all built-in DRF authentication classes.
10. Which are DRF generic views for model CRUD operations?
11. Which are valid DRF pagination classes?
12. Which permissions restrict access to authenticated users?
13. Which are features of ModelSerializer?
14. DRF requires Django models to build APIs.
15. serializer.is_valid() returns True if incoming data passes the serializer's validation rules.
16. APIView is a base class with no built-in CRUD actions (e.g., list, create).
17. HyperlinkedModelSerializer uses URLs instead of primary keys for model relationships.
18. What does 'DRF' stand for?
19. Name the DRF decorator used to define function-based views (e.g., @decorator def my_view(request): ...).
20. What DRF class auto-generates URL patterns for ViewSets?
Answered 0 of 0 — 0 correct