#NEWLINE# @ app . route ( '/<username>/create_subset/<int:folder_id>/<int:ex_id>' , methods = [ 'POST' ] ) #NEWLINE# def create_subset( username = None , folder_id = None , ex_id = None ) : #NEWLINE# #INDENT# docIDs = dict ( ) #NEWLINE# for x in request . form . getlist ( 'docIdxs[]' ) : #NEWLINE# #INDENT# docIDs [ int ( x ) ] = 0 #NEWLINE# #UNINDENT# fOld = Folder . query . get ( folder_id ) #NEWLINE# name = request . form [ 'name' ] #NEWLINE# user_id = g . user . id #NEWLINE# fNew = Folder ( fOld . dataset_id , name , fNew ) #NEWLINE# db . session . add ( fNew ) #NEWLINE# db . session . commit ( ) #NEWLINE# fNew . initialize ( ) #NEWLINE# return Response ( status = '200' )