#NEWLINE# @ profile . route ( '/<string:username>' ) #NEWLINE# @ login_required #NEWLINE# def dashboard_library( username = None ) : #NEWLINE# #INDENT# 'Return user dashboard library page.\n    ' #NEWLINE# if ( ( username is None ) or ( username == current_user . username ) ) : #NEWLINE# #INDENT# user = current_user #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# user = db . session . query ( User ) . filter ( ( User . username == username ) ) . first ( ) #NEWLINE# if ( not user ) : #NEWLINE# #INDENT# abort ( http . NOT_FOUND ) #NEWLINE# #UNINDENT# #UNINDENT# session . pop ( current_user . username , None ) #NEWLINE# return render_template ( 'library.jinja' , name = user . username )