Introduction

Welcome to the first lesson of our course on building a TODO app using Django and Django REST Framework (DRF). In this lesson, we'll lay the foundation by setting up our development environment. A solid setup is crucial for effective and efficient development. By the end of this lesson, you will have installed the necessary libraries, created a Django project and app, and configured the basic settings and routing needed to get started.

This initial setup acts as the backbone of any Django-based project. Understanding how to configure and initialize your environment correctly is essential for the smooth development of our TODO app, which we'll build upon in future lessons.

Installing Django and DRF

Before we start creating our project, we need to install Django and DRF. These libraries form the core of our development environment.

To install Django and DRF, open your terminal and run the following command:

This command installs Django, a high-level Python web framework that encourages rapid development, and Django REST Framework, a powerful and flexible toolkit for building Web APIs.

Execute it in a Python virtual environment to keep your project dependencies isolated. These libraries will come pre-installed in CodeSignal's environment.

Creating a Django Project

Next, we'll create a new Django project. A Django project is a collection of settings for an instance of Django, including database configuration, application-specific settings, and application initialization.

Run the following commands in your terminal:

Here's what each command does:

  • django-admin startproject myproject: This command creates a new directory called , which contains the initial project structure.
Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal