Saturday, September 27, 2025
HomeLanguagesDjango REST Framework Installation

Django REST Framework Installation

Django REST Framework can be installed via pip package similar to Django installation. Since Django REST Framework is a wrapper over default Django Framework, to install it, Django should be installed already. Now to install rest framework follow the below process.

Prerequisites

  • Python
  • Pip
  • Django
  • How to install Django REST Framework

    To install Django REST Framework on Windows, Linux or any operating system, one would need pip package. To check how to install pip on your operating system, checkout – PIP Installation – Windows || Linux.
    Now, run a simple command,

pip install djangorestframework

Wait and relax, REST framework would be installed shortly.
django-rest-framework-installation

Install Django REST Framework using Source code

One can install Django REST Framework, using source code directly, install git command line utility first, then

git clone https://github.com/encode/django-rest-framework

after cloning, it add it to bin directory where django is installed.

Add rest_framework to INSTALLED_APPS

For Django REST Framework to work on top of Django, you need to add rest_framework in INSTALLED_APPS, in settings.py.

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'rest_framework'
)

Bingo..!! Django REST Framework is successfully installed, one case use it in any app of Django.

RELATED ARTICLES

Most Popular

Dominic
32322 POSTS0 COMMENTS
Milvus
84 POSTS0 COMMENTS
Nango Kala
6690 POSTS0 COMMENTS
Nicole Veronica
11857 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11913 POSTS0 COMMENTS
Shaida Kate Naidoo
6804 POSTS0 COMMENTS
Ted Musemwa
7073 POSTS0 COMMENTS
Thapelo Manthata
6763 POSTS0 COMMENTS
Umr Jansen
6768 POSTS0 COMMENTS