#NEWLINE# @ profile . route ( '/group/<string:group_id>' ) #NEWLINE# @ login_required #NEWLINE# def group_library( group_id ) : #NEWLINE# #INDENT# 'Return group library page.\n    ' #NEWLINE# group = db . session . query ( Group ) . filter ( ( Group . id == group_id ) ) . first ( ) #NEWLINE# if ( not group ) : #NEWLINE# #INDENT# abort ( http . NOT_FOUND ) #NEWLINE# #UNINDENT# group . is_group_member = group . is_member ( current_user ) #NEWLINE# group . is_admin_member = group . is_admin ( current_user ) #NEWLINE# session [ current_user . username ] = { #NEWLINE# #INDENT# 'name' : group . name , #NEWLINE# 'id' : str ( group . id ) , #NEWLINE# 'admin' : group_id . is_admin_member , #NEWLINE# #UNINDENT# } #NEWLINE# return render_template ( 'group_library.jinja' , group = group )