clone this repo

install virtualenv using

  • pip install virtualenv

create new env using

  • virtualenv env or python -m virtualenv env

activate virtualenv

  • (linux) source env/bin/activate
  • (windows) env\bin\activate

install dependecies in env

  • pip install -r requirements.txt

Run migrations

  • python manage.py migrate

Create a superuser using

  • python manage.py createsuperuser

Go to admin panel -

Create dummy products to test the API or you can load the dummy data from db.json file

using

  • python manage.py loaddata db.json

Run test using

  • python manage.py test

Hit API endpoint to buy ice cream from truck with payload

{ 'product':'product-slug', 'truck':'truck-slug' }

Hit API endpoint to check total sales of truck