The Django REST framework (DRF) is a toolkit built on top of the Django web framework that reduces the amount of code you need to write to create REST interfaces.
This Django Rest FrameWork project having 3 types of views
- normal views
- Class Based View
- Mixin View and Generic Views
- Simplicity, flexibility, quality, and test coverage of source code.
- Powerful serialization engine compatible with both ORM and non-ORM data sources.
- Pluggable and easy to customise emitters, parsers, validators and authenticators.
- Generic classes for CRUD operations.
Django Rest Frame_work requires
Install the dependencies by using the following command.
pip install djangorestframework
add the frame work in settings file...
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'API',
'rest_framework',
'rest_framework_swagger',
]
for start the django server use the following command
python manage.py runserver
Verify the deployment by navigating to your server address in your preferred browser.
127.0.0.1:8000
MIT