Module ImportFrom alias alias FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Dict If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Dict Str NameLoad If Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list Return NameLoad decorator_list Return NameLoad decorator_list
N/A watson.framework views controllers view N/A N/A template format N/A None None N/A N/A Return the view model in a specific format and with a specific template.

    This will not work if the response returned from the controller is of
    the watson.http.messages.Response type.

    Args:
        func (callable): the function that is being wrapped
        template (string): the template to use
        format (string): the format to output as

    Returns:
        The view model in the specific format

    Example:

    .. code-block:: python

        class MyClass(controllers.Rest):
            @view(template='edit')
            def create_action(self):
                return 'something'
     decorator N/A N/A func N/A N/A wrapper N/A N/A self N/A args kwargs N/A N/A controller_response N/A func self args kwargs N/A N/A controller_response None N/A N/A controller_response N/A N/A N/A isinstance controller_response N/A controllers ACCEPTABLE_RETURN_TYPES N/A N/A controller_response N/A content controller_response N/A N/A isinstance controller_response N/A dict list tuple N/A N/A controller_response N/A N/A views Model data controller_response N/A format N/A N/A N/A controller_response format format N/A template N/A N/A N/A controller_response template template N/A controller_response N/A N/A wrapper N/A N/A decorator N/A