Bird
0
0

After installing DRF, which setting must you add to your Django project's settings.py to enable it?

easy📝 Conceptual Q2 of 15
Django - REST Framework Basics
After installing DRF, which setting must you add to your Django project's settings.py to enable it?
A'django_rest_framework' in INSTALLED_APPS
B'rest_framework' in MIDDLEWARE
C'restframework' in MIDDLEWARE
D'rest_framework' in INSTALLED_APPS
Step-by-Step Solution
Solution:
  1. Step 1: Locate the correct setting for enabling apps

    Apps are enabled by adding their names to INSTALLED_APPS in settings.py.
  2. Step 2: Add the correct app name

    The correct app name for DRF is 'rest_framework'. It should be added to INSTALLED_APPS, not MIDDLEWARE.
  3. Final Answer:

    'rest_framework' in INSTALLED_APPS -> Option D
  4. Quick Check:

    Enable DRF by adding to INSTALLED_APPS = B [OK]
Quick Trick: Add 'rest_framework' to INSTALLED_APPS, not MIDDLEWARE [OK]
Common Mistakes:
MISTAKES
  • Adding to MIDDLEWARE instead of INSTALLED_APPS
  • Using wrong app name like 'django_rest_framework'
  • Forgetting to add it at all

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes