<s> from functools import wraps <EOL> from flask import session , redirect , url_for , request <EOL> def login_required ( f ) : <EOL> @ wraps ( f ) <EOL> def do ( * args , ** kwargs ) : <EOL> if '<STR_LIT:username>' not in session : <EOL> return redirect ( '<STR_LIT>' ) <EOL> return f ( * args , ** kwargs ) <EOL> return do </s>
