Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 715 Bytes

README.md

File metadata and controls

50 lines (36 loc) · 715 Bytes

Initialization

Create a virtual environment

python3 -m venv venv-api
source venv-api/bin/activate

Install requirements.txt

pip install -r requirements.txt

Create superuser

python manage.py createsuperuser

Add sqlite db

db.sqlite3

Add PostgreSQL db (uncomment the code in settings.py)

Then, create an .env file and add the following to connect your local database

LOCAL_DB_NAME=db-name
LOCAL_DB_USER=
LOCAL_DB_PASSWORD=
LOCAL_DB_HOST=127.0.0.1
LOCAL_DB_PORT=5432

Migrate models

python manage.py makemigrations
python manage.py migrate

Run

python manage.py runserver