#NEWLINE# @ app . route ( '/playlists/add' , methods = [ 'GET' , 'POST' ] ) #NEWLINE# def add_playlist( ) : #NEWLINE# #INDENT# form = NewPlaylistForm ( ) #NEWLINE# if form . validate_on_submit ( ) : #NEWLINE# #INDENT# playlist = db [ 'playlists' ] . new ( name = form . name . data ) #NEWLINE# flash ( 'Success' ) #NEWLINE# return redirect ( url_for ( 'edit_playlist' , id = playlist . id ) ) #NEWLINE# #UNINDENT# return render_template ( 'playlists/add.html' , ** { #NEWLINE# #INDENT# 'form' : form , #NEWLINE# #UNINDENT# } )