Searching non-text columns - Flask-Admin
Flask-Admin’s search box only worked on text columns. I had a ModelView showing usernames next to a related number, and to find a row by that number you had to set up a filter instead of just typing it into the search box.
So I loosened the search to accept non-text SQLAlchemy columns too (integers, dates, and so on), using ILIKE, which casts and matches across those types (#795). I added tests for searching integer columns on SQLite and MySQL, across SQLAlchemy 0.7 and 0.9.8.
class UserView(ModelView):
column_searchable_list = ['username', 'account_number'] # account_number is an integer