Stock Trading is an application for stock market trading. User can able to place order to buy and sell stock. And be able to upload a CSV file for bulk trades.
You must provide values for the environment variables in your .env
file.
NAME | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
---|---|---|---|---|
POSTGRES_HOST | String | True | None | Database hostname. |
POSTGRES_PORT | Number | True | None | Database port. |
POSTGRES_DB | String | True | None | Database name. |
POSTGRES_USER | String | True | None | Database username. |
POSTGRES_PASSWORD | String | True | None | Database password. |
POSTGRES_PASSWORD | String | True | None | Database password. |
SECRET_KEY | String | True | None | Secret key for hashing sensitive data. |
HOST | String | False | localhost | Application hostname. |
CORS | List | False | http://localhost | List of allowed urls. (Comma separated) |
DEBUG | Boolean | False | False | Enable debugging. |
docker-compose up
docker exec -it stocktrading python3 manage.py createuseruser
Change the core
with the module you want to test.
docker exec -it stocktrading python3 manage.py test core.tests
Go to the URL below and create a new application.
http://localhost:8080/api/v1/auth/applications/
- Name: The name of you OAuth application
- Client Type: confidential
- Authorization Grant Type: Resource owner password-based
Copy the Client Secret original value, it will be hash later.
For more information about Django OAuth Toolkit follow the link.