OpenQuizz
Une application de gestion des contenus pédagogiques
Nested Class Reference
Inheritance diagram for Nested:
Collaboration diagram for Nested:

Public Member Functions

def __init__ (self, model, allow_null=False, skip_none=False, as_list=False, **kwargs)
 
def nested (self)
 
def output (self, key, obj, ordered=False, **kwargs)
 
def schema (self)
 
def clone (self, mask=None)
 
- Public Member Functions inherited from Raw
def __init__ (self, default=None, attribute=None, title=None, description=None, required=None, readonly=None, example=None, mask=None, **kwargs)
 
def format (self, value)
 
def output (self, key, obj, **kwargs)
 
def __schema__ (self)
 

Data Fields

 model
 
 as_list
 
 allow_null
 
 skip_none
 
- Data Fields inherited from Raw
 attribute
 
 default
 
 title
 
 description
 
 required
 
 readonly
 
 example
 
 mask
 

Detailed Description

Allows you to nest one set of fields inside another.
See :ref:`nested-field` for more information

:param dict model: The model dictionary to nest
:param bool allow_null: Whether to return None instead of a dictionary
    with null keys, if a nested dictionary has all-null keys
:param bool skip_none: Optional key will be used to eliminate inner fields
                       which value is None or the inner field's key not
                       exist in data
:param kwargs: If ``default`` keyword argument is present, a nested
    dictionary will be marshaled as its value if nested dictionary is
    all-null keys (e.g. lets you return an empty JSON object instead of
    null)

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  model,
  allow_null = False,
  skip_none = False,
  as_list = False,
**  kwargs 
)

Member Function Documentation

◆ clone()

def clone (   self,
  mask = None 
)

Reimplemented in Polymorph.

◆ nested()

def nested (   self)

◆ output()

def output (   self,
  key,
  obj,
  ordered = False,
**  kwargs 
)

Reimplemented in Polymorph.

◆ schema()

def schema (   self)

Reimplemented from Raw.

Field Documentation

◆ allow_null

allow_null

◆ as_list

as_list

◆ model

model

◆ skip_none

skip_none

The documentation for this class was generated from the following file: