Search On Non-text Column In Flask-admin
I have a sqlalchemy model: class Multicast(db.Model): __tablename__ = 'multicast' id = Column(Integer, primary_key=True) addr = Column(Inet) name = Column(Unicode(6
Solution 1:
I found some solution. I overrided get_list method in MulticastView. I copied all source code from ModelView and added a line in search criteria code:
filter_stmt.append(func.text(Multicast.addr).like(stmt))
It works!
Post a Comment for "Search On Non-text Column In Flask-admin"