PJ's Landed Take-Home Assignment

Setup

  1. Clone the repo:

    $ git clone git@github.com:pjhoberman/pj-landed-takehome.git landed2 && cd landed2

  2. Set up and activate a virtual environment:

    $ python3 -m venv . $ source bin/activate

  3. Install requirements:

    $ pip install -r requirements.txt

  4. Run migrations:

    $ python manage.py migrate

  5. Load the data. You can load them from fixtures or load them fresh.

    1. Load from fixtures:

      $ python manage.py loaddata agents

    2. Load fresh via script

      It's not set up as a module yet, so just copy the code from agents/data_import.py to the shell

  6. Visit http://127.0.0.1:8000/ to see the api root.

    1. http://127.0.0.1:8000/agent to list all agents and see documentation
    2. http://127.0.0.1:8000/agent/{field}/{value} to filter by a single field
    3. http://127.0.0.1:8000/agent/{id} to see details on a single agent