def all(cls, include_deactivated=False):
        """
        Get all sub-resources
        :param include_deactivated: Include deactivated resources in response

        :returns: list of SubResource instances
        :raises: SocketError, CouchException
        """
        if include_deactivated:
            resources = yield cls.view.get(include_docs=True)
        else:
            resources = yield cls.active_view.get(include_docs=True)

        result = []

        for resource in resources['rows']:
            parent = cls.parent_resource(**resource['doc'])
            result.append(cls(parent=parent, **resource['value']))

        raise Return(result)
def all ( cls , include_deactivated = False ) : if include_deactivated : resources = yield cls . view . get ( include_docs = True ) else : resources = yield cls . active_view . get ( include_docs = True ) result = [ ] for resource in resources [ 'rows' ] : parent = cls . parent_resource ( ** resource [ 'doc' ] ) result . append ( cls ( parent = parent , ** resource [ 'value' ] ) ) raise Return ( result )
Get all sub-resources
        :param include_deactivated: Include deactivated resources in response

        :returns: list of SubResource instances
        :raises: SocketError, CouchException