Search⌘ K
AI Features

Installations

Explore the process of setting up a development environment for full stack Django and React projects. This lesson guides you through installing Django, PostgreSQL, Node.js, and configuring VS Code with useful extensions, as well as setting up Git and browser debugging tools. By the end, you will be ready to develop and debug your applications locally with all necessary tools installed and configured.

Installing Django

There are two ways to install packages in Python. You can easily just run:

C
pip install package_name

Alternatively, you can write the package name with the version in a text file.

Note: This section is only required if you are creating the project locally on your machine.

Just know that there can be some differences between the version and it can affect your project.

Create a file named requirements.txt at the root of the django-api directory and add the Django package name:

Django==4.0
requirements.txt

Now, run the following command to install Django:

C
pip install -r requirements.txt

Installing Postgres

Note: This section is only required if you are creating the project locally on your machine.

Depending to your OS, you can download different Postgres versions on the Postgres website. In this course, we are working with PostgreSQL 14.

Once you have installed Postgres from the link above, install a PostgreSQL adapter for Python, psycopg:

C
pip install psycopg2-binary

Don’t forget to add this to the requirements.txt file:

Django==4.0
psycopg2_binary==2.9.2
The requirements.txt file

Installing Django Rest Framework and JWT authentication plugin

Note: This section is only required if you are creating the project locally on your machine.

The DRF package can be installed with this command:

C
pip install djangorestframework django-filter

Don’t forget to add the following to the requirements.txt file:

Django==4.0
psycopg2_binary==2.9.2
djangorestframework==3.13.1
django-filter==21.1
The requirements.txt file

Installing package for JWT authentication

The ...