def col_delete(cols_selected):
 if (len(cols_selected) < 1):
  flash('No collections selected to delete!', 'error')
 else:
  for source_id in cols_selected:
   delete_collection(source_id)
  flash(('%s %s deleted' % (len(cols_selected), ('collection' if (len(cols_selected) == 1) else 'collections'))), 'notification')
 return redirect(url_for('index'))

def col_delete ( cols_selected ) : if ( len ( cols_selected ) < 1 ) : flash ( 'No collections selected to delete!' , 'error' ) else : for source_id in cols_selected : delete_collection ( source_id ) flash ( ( '%s %s deleted' % ( len ( cols_selected ) , ( 'collection' if ( len ( cols_selected ) == 1 ) else 'collections' ) ) ) , 'notification' ) return redirect ( url_for ( 'index' ) )
deleting multiple collections from the index .