#NEWLINE# def files( ) : #NEWLINE# #INDENT# '\n    All files page.\n\n    List all files from Dropbox if user is logged in. If user is not logged\n    in - redirects to "Home" page.\n    ' #NEWLINE# if ( not dropbox . is_authenticated ) : #NEWLINE# #INDENT# return redirect ( url_for ( 'home' ) ) #NEWLINE# #UNINDENT# client = dropbox . client #NEWLINE# data = client . metadata ( '/' ) #NEWLINE# info = dropbox . account_info #NEWLINE# for item in data [ 'contents' ] : #NEWLINE# #INDENT# item [ 'path' ] = item [ 'path' ] . lstrip ( '/' ) #NEWLINE# #UNINDENT# return render_template ( 'files.html' , data = data , info = info )