Python <= 3.11 Postgresql <= 15.1
- Download and install postgres locally.
- Create a new database
gpa
- Create a new database
- Clone this repository and run
pip install -r requirements.txt
. - Create
.env
file with the variables found in.env.example
- Run
python manage.py makemigrations gpa
andpython manage.py migrate
- Run
python manage.py runserver
to start the api server. - Run
python manage.py createsuperuser
to create a superuser - Create a new user in GPA UI at
127.0.0.1:5173/signup
.- Note: Using Django Admin at
127.0.0.1:8000/admin/
does not properly create accounts with hash passwords.
- Note: Using Django Admin at
- Use
127.0.0.1:8000/api/
to create some sample accounts and transactions.- Examples
- Create new account:
http://127.0.0.1:8000/api/users/1/accounts/create/
- Create new transaction:
http://127.0.0.1:8000/api/accounts/1/transactions/create/
- Get balance of account on specified date
http://localhost:8000/api/accounts/1/balance/2023-03-10/
- Create new account:
- Examples
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
python -m black .
python manage.py createsuperuser
python manage.py makemigrations gpa