def login_required(view):
@functools.wraps(view)<EOL>def wrapped_view(**kwargs):<EOL><INDENT>if g.user is None:<EOL><INDENT>return redirect(url_for("<STR_LIT>"))<EOL><DEDENT>return view(**kwargs)<EOL><DEDENT>return wrapped_view<EOL>
View decorator that redirects anonymous users to the login page.