> Hello,
> my opinion is that is great , but for normal use, i think the programmer 
> should not try to reinvent the wheel every time he needs a table.
> So my suggestion is that you could make a widget to permit the creation of 
> the table in a snap.
> 
> Best regards
> 
> António

Antônio, thank you for the comment and suggestion.

Every option has a default behavior, so the only two lines needed to have a 
table is:

plugins.powerTable.datasource = Table or Query or Set or Rows or List or Dict 
or URL
return plugins.powerTable.create()

If needed to override default values, it can be defined in a model for every 
table. 

Is it easy to create a helper for that,

at model. 

def power_table(datasource=None, features={}, attrs={}):
tbl = plugins.powerTable
tbl.datasource = datasource
tbl.dtfeatures = features
for k in attrs: tbl[k] = attrs[k]
return tbl.create()

so in view or controller

{{=power_table(db.table)}}


Is that what you mean by widget?

I'll try to include it as a default helper in plugin. 

Thank you

Bruno. 



> 
> 
> 2010/12/30 Bruno Rocha <rochacbr...@gmail.com>
> Here is a complete list of working powerTable options:
> https://bitbucket.org/rochacbruno/powertable/src/e80ed190dea5/controllers/default.py#cl-52
> 

Reply via email to