I have a sqlalchemy table defined like follows
class Album(DeclarativeBase):
# Name of mapped db table
__tablename__ = 'material'
id = Column(Integer, primary_key=True)
name = Column(Unicode(50), nullable=False, unique=True)
@memoized_property
def total_sales(self):
do some calculation here
return result
When I use tw2.sqla.DbListPage I can see the total_sales column like this
class AlbumIndex(tw2.sqla.DbListPage):
entity = model.Album
newlink = twf.LinkField(link='/album/album', text='New', value=1)
class child(twf.GridLayout):
name = twf.LabelField()
total_sales = twf.LabelField()
But when I use tw2.jqplugins.jqgrid.SQLAjqGridWidget, the total_sales is
not visible. Based on the naming of the classes, it seems that both are
based on sqla only. Then why this discrepancy, or I am missing out on
something. the ajqgrid looks very nice, but is it not possible to show
defined attributes like total_sales column?