- git installed on the dev system
- python installed on the dev system
-
clone the repo:
git clone git@github.com:SpokaneTech/web_demo_python.git-- or --
git clone https://github.com/SpokaneTech/web_demo_python.git -
cd into the repo directory
cd web_demo_python -
create a python virtual environment
python -m venv venv -
activate the python virutal environment
source venv/bin/activate -
install the python dependancies
pip install .[dev] -
cd to the django_project directory
cd django_project -
create a local sqlite3 database by running django migrations
./manage.py migrate -
create a local admin user
./manage.py add_superuser --group admin -
generate some test data
./manage.py generate_data -
start the local demo server
./manage.py runserver -
open a browser and navigate to http://127.0.0.1:8000 (log in with admin/admin)
** you can stop the local demo server anytime via
ctrl + c
FYI:
- steps 1-9 only need to be done once (unless you need to apply new migrations or start over);
- restart the demo server anytime with the django management command:
./manage.py runserver
