Quickstart

mkdir project && cd project
python3 -m venv venv
source venv/bin/activate
pip install django
django-admin startproject main .
python manage.py runserver
django-admin startapp base
django-admin startapp blog

Longer Version

Create the project folder:

mkdir project && cd project

Create a virtual environment:

python3 -m venv venv

Activate the virtual environment:

source venv/bin/activate

Install Django:

pip install django

This will download the latest Django package inside the activated virtual environment. (project/venv/lib/python3.6/site-packages/django)

Use pip freeze > requirements.txt to store package information in the requirements file and move that file to the testing / production environment with git. In the target environment run pip install -r requirements to install the packages listed in that file.

Create the project file structure:

django-admin startproject main .

This creates the basic stucture for a Django project. main is the main app that contains things like the project settings.py file.

Now you should have this kind of file structure:

project
├── main
│   ├── __init__.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── manage.py
└── venv
    ├── bin
    ├── include
    ├── lib
    ├── pip-selfcheck.json
    └── pyvenv.cfg

Run the development server:

python manage.py runserver

Visit http://127.0.0.1:8000/ to see the welcome page.

Start creating apps for the project:

django-admin startapp base
django-admin startapp blog

Now you should have a folder stucture like this:

project
├── base
├── blog
├── main
├── manage.py
└── venv