#NEWLINE# def update_score( score ) : #NEWLINE# #INDENT# app = create_app ( ) #NEWLINE# db . init_app ( app ) #NEWLINE# ctx = app . test_request_context ( ) #NEWLINE# ctx . push ( ) #NEWLINE# user = models . User . query . filter ( ( models . User . username == '{{ username }}' ) ) . first ( ) #NEWLINE# user . score = score #NEWLINE# db . session . merge ( user ) #NEWLINE# db . session . commit ( ) #NEWLINE# ctx . pop ( )