-
Install python and pip
-
create virtual env named
deven
usingpython -m venv deven
-
Activate the venv
deven
withsource deven/bin/activate
in linux.\deven\Scripts\activate.bat
in windows powershellsource deven/Scripts/activate
in windows git bash -
Run
pip install -r requirements.txt
python manage.py runserver
Create a .env
file in the project root (where manage.py resides)
for all the settings that are not same in all cases and
for secrets. They are loaded to the settings file with the help of
python package: python-decouple
An example .env
file looks as follows:
DEBUG=True
DATABASE_NAME=django_db
DATABASE_USER=django
DATABASE_PASSWORD=abcd
DATABASE_HOST=localhost
DATABASE_PORT=5432
Add any new settings relying on .env
file to the above.