def before_request(): g.permission = User.auth() if g.permission >= 2: g.this_user = User(session['id'], session['id']) g.sm_av_path = User.get_avatar_mini_path(session['id']) g.av_path = User.get_avatar_path(session['id']) g.connection_ids, g.requested_connection_ids, g.unconfirmed_connection_ids = \ User.get_all_connection_ids(session['id']) g.all_connection_ids = list( set(g.connection_ids + g.requested_connection_ids + g.unconfirmed_connection_ids))
def before_request(): g.permission = User.auth() if g.permission >= 2: g.this_user = User(session['id'], session['id'])
def before_request(): g.permission = User.auth()