An example of using Django API Forms with a ModelChoiceField.
- Clone this repository and navigate to the directory.
- Create virtualenv:
virtualenv .venv
- Activate the virtualenv:
source .venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Initialize database schema:
python manage.py migrate
- Load initial data:
python manage.py loaddata myapp/fixtures/*
Start the back-end in your first terminal:
python manage.py runserver
Run this command to POST json to the api:
curl -X POST -H "Content-Type: application/json" -d @./example.json http://localhost:8000/
Watch the terminal for results.