def requires_attr(attr_name, raiser):
    def decorator(meth):
        @functools.wraps(meth)
        def wrapper(self, *args, **kwargs):
            if getattr(self, attr_name, None) is None:
                raiser(self, meth, attr_name)
            return meth(self, *args, **kwargs)
        return wrapper
    return decorator
Render foundation alert box.
dataset/ETHPy150Open scrapinghub/splash/splash/utils.py/requires_attr--crossover with--dataset/ETHPy150Open allegro/ralph/src/ralph/lib/foundation/templatetags/foundation_alert.py/alert