Django - REST Framework BasicsWhy does the browsable API interface use HTML forms for POST requests instead of sending raw JSON?ABecause JSON is not supported by Django REST FrameworkBTo allow easy testing and submission via web browsers without extra toolsCTo improve API performance by using formsDTo prevent CSRF attacks automaticallyCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand browsable API design goalThe browsable API aims to make API testing easy in browsers by using HTML forms for input.Step 2: Evaluate other optionsJSON is supported by DRF (A is false). Forms do not improve performance (C false). CSRF protection is separate (D false).Final Answer:To allow easy testing and submission via web browsers without extra tools -> Option BQuick Check:Forms in browsable API = easy browser testing [OK]Quick Trick: Forms let browsers test APIs without extra tools [OK]Common Mistakes:MISTAKESThinking JSON is unsupported by DRFBelieving forms improve performance or prevent CSRF
Master "REST Framework Basics" in Django9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Django Quizzes Async Django - When async helps and when it does not - Quiz 11easy Caching - Template fragment caching - Quiz 2easy Celery and Background Tasks - Redis as message broker - Quiz 7medium Celery and Background Tasks - Celery installation and setup - Quiz 3easy DRF Advanced Features - Custom serializer fields - Quiz 14medium DRF Advanced Features - DRF permissions - Quiz 1easy DRF Advanced Features - DRF authentication (Token, JWT) - Quiz 6medium Django REST Framework Basics - Generic views in DRF - Quiz 11easy Security Best Practices - Clickjacking protection - Quiz 4medium Security Best Practices - Security checklist (manage.py check --deploy) - Quiz 9hard