Getting Started with Django REST Framework
# Getting Started with Django REST Framework
Django REST Framework (DRF) is a powerful toolkit for building Web APIs in Django. In this tutorial, we'll explore the basics of creating RESTful APIs.
## Installation
First, install Django REST Framework:
```bash
pip install djangorestframework
```
## Basic Setup
Add 'rest_framework' to your INSTALLED_APPS in settings.py:
```python
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'rest_framework',
# your apps
]
```
## Creating Your First API
Let's create a simple API for a Book model...