1

Create a Django project

Virtual Environment (Optional):

To understand and create a Python virtual environment: Windows, Mac&Linux

Install Django:

pip3 install django

Create a Django project:

Before running the command below, make sure to change your directory to where you want you Django project to be.

django-admin startproject project

This is what you'll get:

Django creates a directory with the same name as your project, which contains several files:

  1. manage.py: A command-line utility that lets you interact with your project, including running development servers, running database migrations, and executing tests.
  2. settings.py: The main configuration file for your project. It contains settings such as database connection details, installed apps, and middleware.
  3. urls.py: The file that maps URLs to views. It contains a list of URL patterns, each with a corresponding view function.
  4. wsgi.py: A file used for deploying your project on a WSGI server, such as Apache or Nginx.
  5. asgi.py: A file used for deploying your project on an ASGI server, such as Daphne or Uvicorn.
442
Mohamed
El Firdoussi