🍡 Django Tutorial
New Project

Updated at 2018-11-23 18:14

Create a virtual environment:

# some virtualenv macro magic over here, creating a Python virtual env
vmk3 djangor
v djangor
pip install pip-tools

Define initial project dependencies:

echo -e "pip-tools" >>
pip-compile --output-file requirements-dev.txt
pip install -r requirements-dev.txt

echo -e "django" >>
pip-compile --output-file requirements.txt
pip install -r requirements.txt

Generate project template:

django-admin startproject djangor .

Enable Django support if using PyCharm:

Settings > Languages & Frameworks > Django

Commit the initial state to version control:

git init
echo -e ".idea/\n*.sqlite3" >> .gitignore
git add -A
git commit -m 'Init Django project'