Skip to content

Latest commit

 

History

History
48 lines (42 loc) · 931 Bytes

README.md

File metadata and controls

48 lines (42 loc) · 931 Bytes

Nested Serializers

In the panel to add information, you will see Lists are not currently supported in HTML input, that's it normal.

Installation

  1. Create your own environment (virtualenv, virtualenvwrapper, etc)
  2. pip install -r requirements.txt
  3. python manage.py makemigrations
  4. python manage.py migrate
  5. python manage.py runserver

Raw data

{
    "ingredients": [],
    "name": "",
    "description": "",
    "directions": ""
}

Adding existing ingredients, and recipe.

{
    "ingredients": [
      {"name":"pepper"},
      {"name":"salt"}
    ],
    "name": "Sandwich",
    "description": "Make me a Sandwich",
    "directions": "Sudo !!"
}

Adding exist ingredients and recipe

{
    "ingredients": [
      {"id": 1, "name":"pepper"},
      {"id": 2, "name":"salt"}
    ],
    "name": "Sandwich",
    "description": "Make me a Sandwich",
    "directions": "Sudo !!"
}