Skip to content

jmbloodycon/account_api

Repository files navigation

Django Project Template

Works with PostgreSQL.

##Implement 4 api methods:

  • / api / ping (service health)
  • / api / add (balance top-up)
  • / api / substract (decrease balance)
  • / api / status (balance balance, account opened or closed)

For "add" and "substract" methods, the Request must contain data in the form

{
    "id": id account (str),
    "money": the amount of money to complete the operation
}

Run project

$ docker-compose up

Install requirements

$ pip install -r requirements/development.txt

Run a database

$ docker-compose up -d postgres

Set up local settings

$ vi config/settings/local.py

Put your local settings in the local.py, you can override settings consider your local environment. Start with lines below:

from .base import *

Apply migrations

$ ./manage.py migrate

Create Superuser

The project will use E-Mail address as username.

$ ./manage.py createsuperuser

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors