OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, field) |
def | __call__ (self, f) |
Data Fields | |
field | |
A decorator that formats the return values of your methods with a single field. >>> from flask_restful import marshal_with_field, fields >>> @marshal_with_field(fields.List(fields.Integer)) ... def get(): ... return ['1', 2, 3.0] ... >>> get() [1, 2, 3] see :meth:`flask_restful.marshal_with`
def __init__ | ( | self, | |
field | |||
) |
:param field: a single field with which to marshal the output.
def __call__ | ( | self, | |
f | |||
) |
field |