Creates a view from an spec dict (typically, the YAML front-matter).

def create_view_from_dict(name, spec, template=None, cls=ActionsView):
    """Creates a view from an spec dict (typically, the YAML front-matter).
    """
    kwargs = dict(spec)
    if template is not None:
        kwargs.setdefault("template", template)
    actions = load_grouped_actions(kwargs, pop_keys=True)
    view = cls(name=name, **kwargs)
    if isinstance(view, ActionsView):
        view.actions.extend(actions)
    return view