#NEWLINE# @ api . route ( '/classes/<int:id>' , methods = [ 'PUT' ] ) #NEWLINE# @ json #NEWLINE# def edit_class( id ) : #NEWLINE# #INDENT# class_ = Class . query . get_or_404 ( id ) #NEWLINE# class_ . import_data ( request . get_json ( force = True ) ) #NEWLINE# db . session . add ( class_ ) #NEWLINE# db . session . commit ( ) #NEWLINE# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# }