Project that shows the use of a currency and its operations developed with Django, Django-rest-framework and AngularJS.
A step by step series of examples that tell you have to get a development env running
In the console run the following commands:
- Activate a virtualenv:
source env/bin/activate
- In the project folder:
pip install -r requirements.txt
cp currency_exchanger/settings/secrets_example.py currency_exchanger/settings/secrets.py
python manage.py makemigrations
python manage.py migrate
python manage.py loaddata static/fixtures/currencies.json
- Create some users with:
python manage.py createsuperuser
cd static/client/currency-exchanger
sudo npm install -g @angular/cli
npm install
ng build
cd ..
three timespython manage.py runserver
- Go to localhost
- Login with a user created
- Create a wallet for example of Peso Argentino curreny
- Logout and login with other user created
- Create a wallet of Peso Argentino too, because the sender and the receiver must have a wallet of same currency
- Make a transaction of 100 Pesos to the previous user.
- See the result of the operation and make other transactions and operations in the site.
Running this commands you can test some API operations
- python manage.py test exchanger_app.tests.ApiTestCase.test_api_can_create_a_currency --keepdb
- python manage.py test exchanger_app.tests.ApiTestCase.test_api_can_get_a_currency --keepdb
- python manage.py test exchanger_app.tests.ApiTestCase.test_api_can_update_currency --keepdb
- python manage.py test exchanger_app.tests.ApiTestCase.test_api_can_delete_currency --keepdb
- python manage.py test exchanger_app.tests.ApiTestCase.test_api_can_create_a_transaction --keepdb