Closed vpathuis closed 1 year ago
Works perfect! The issue was not in the data but in the titles, which I'd assumed optional. I missed this sentence: if not provided, will automatically detect on provided data, currently only support SQLAlchemy object. Thanks a lot for reacting, and so quickly!
Could it be there is a similar simple solution for using the action buttons? When I use show_actions = True
and add a model (class) and an edit_url, I get jinja2.exceptions.UndefinedError: 'type object' has no attribute 'query'
.
Sounds like SQLAlchemy is needed for that, or you need your class to implement that. See base/table.html line 11.
Thnx for the suggestion. I'll consider my options :) Great work anyhow.
For render_table(), the documentation states: data – An iterable of data objects to render. Can be dicts or class objects. When I try using this macro on a simple test list, I get an error:
AttributeError: 'Item' object has no attribute '__table__'
. It seems that SQLAlchemy is supposed to supply objects with__table__
. All examples I've found use SQLAlchemy.This is the test list:
Is using SQLAlchemy a requirement? If so, is the documentation correct?