def get_view_predicates(view):
    """Returns the given view's predicates as list with (predicate's class
    name, predicate's value) pairs as items. Assumes the predicate's
    value is stored an attribute ``val``.
    """
    predicates = []
    for predicate in getattr(view, "__predicates__", []):
        if hasattr(predicate, "val"):
            predicates.append((type(predicate).__name__, predicate.val))
    return predicates