back

Django Cheat Sheet

Contents

  1. Python Setup
  2. Django Setup
  3. Django CLI Commands

Python Setup

  • Install PyCharm by jet brains or VS Code by Microsoft
  • Download & Install latest version from here Python Release
  • Add installation dir to PATH environment variable.
  • Download & Install VS Code from here VS Code
  • Install Python extension from Marketplace Python Extension
  • Open Command Prompt / Terminal and type ‘python’ to verify installation.

Django Setup

Open a terminal window and run the following to install django


py -m pip install django

once complete, run the following command to verify django


py -m django --version

Django CLI

  • startproject - creates a new project (notice the . at the end, creates project at current dir)
  • startapp - creates a new application
  • runserver - runs the project in development mode at this url http://127.0.0.1:8000/

django-admin startproject project-name .
py manage.py startapp app-name
py manage.py runserver