About Lesson
Installation
- Install DRF:
- Add DRF to
INSTALLED_APPS
in yoursettings.py
:
Basic DRF Configuration
You can define global DRF settings in your settings.py
file.
Example:
# settings.py
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
],
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticated',
],
}
Join the conversation