Skip to content

fercreek/DRFNestedSerializers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 !!"
}

Releases

No releases published

Packages

No packages published

Languages