def login_required(func):
    @wraps(func)
    def wrapper(*a, **kw):
        if not session.get('logged_in'):
            abort(401)
        return func(*a, **kw)
    return wrapper
Decorator that ensures a user
dataset/ETHPy150Open joealcorn/PyPaste/PyPaste/views/admin/__init__.py/login_required