Family Django Site
.vscode | ||
api | ||
.gitignore | ||
.python-version | ||
api-workspace.code-workspace | ||
README.md | ||
requirements.txt |
api
The AHosking.com API
Getting Started
sudo apt install libpq-dev python-dev python3-psycopg2
pip install virtualenv
python3 -m virtualenv .env
- Activate environment
.\.env\Scripts\activate
export DEBUG=false
docker run --name api-postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_USER=api -e POSTGRES_DB=api -p 5432:5432 -d postgres
-
export DATABASE_HOST=localhost export DATABASE_PORT=5432 export DATABASE_USER=api export DATABASE_PASSWORD=mysecretpassword export DATABASE_NAME=api
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py createsuperuser
python manage.py runserver 0.0.0.0:9000
Troubleshooting
pip3 install --upgrade --force-reinstall -r requirements.txt
will re-install requirements and upgrade based on requirements.txt