Skip to content

Example project developed with Django, Django-rest-framework and Angular5

Notifications You must be signed in to change notification settings

emiLosso/currency-exchanger

Repository files navigation

Currency Exchanger

Project that shows the use of a currency and its operations developed with Django, Django-rest-framework and AngularJS.

Installing

A step by step series of examples that tell you have to get a development env running

In the console run the following commands:

Server

  • 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

Client

  • cd static/client/currency-exchanger
  • sudo npm install -g @angular/cli
  • npm install
  • ng build
  • cd .. three times
  • python manage.py runserver
  • Go to localhost

Example

  • 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.

Test

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

About

Example project developed with Django, Django-rest-framework and Angular5

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published