Working without Flask_sqlalchemy
phuicy opened this issue · comments
phuicy commented
So currently this plugin won't work without Flask-sqlalchemy. Specifically, if you sqlalchemy-utils.
Solution:
This section:
is changed to:
# change the query class of this model to our own
if hasattr(model, 'query_class'):
if model.query_class is not flask_sqlalchemy.BaseQuery \
and model.query_class is not _QueryProxy:
print(model.query_class, _QueryProxy)
model.query_class = type(
'MultipliedQuery', (model.query_class, _QueryProxy), {}
)
else:
model.query_class = _QueryProxy
else:
model.query_class = _QueryProxy