Flask-Sqlalchemy + Sqlalchemy-searchable returning empty list

后端 未结 2 1331
无人及你
无人及你 2021-02-06 04:22

First time on the site, so hi to all and thanks in advance. Longtime lurker and newb.

I\'m working on a web app in flask, using Flask-SqlAlchemy and SqlAlchemy-Searchabl

2条回答
  •  别跟我提以往
    2021-02-06 04:38

    On Collin Allen's answer: actually, the flask-sqlalchemy ''db'' exposes the configure_mappers function.

    Replace:

    from sqlalchemy.orm.mapper import configure_mappers
    ...
    configure_mappers()
    

    with:

    ...
    db.configure_mappers()
    

提交回复
热议问题