[web2py] Passing attributes to SQLTable?

Sun, 12 Sep 2010 08:15:27 -0700

I am trying to add a table id to an HTML <table> created by SQLTABLE.
The documentation of SQLTABLE defines an optional **attributes dict
that should be passed through to the HTML table.  The id attribute I
am passing is not appearing in the <table> tag.

The relevant portion of my code is the following:

records_data = db(...).select(...)
col_headers = {...}
return
dict(records=SQLTABLE(records_data,headers=col_headers,truncate=32,id='tablename'))

The 'tablename' id is not appearing in the rendered HTML.

If I'm reading the source code correctly, there is a bug, and the
variables from **attributes are never put into the HTML <table> tag.
Am I missing something?

The relevant source code is
http://www.web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml-pysrc.html#SQLTABLE.__init__
and the related Table and DIV definitions.

Thanks,
Philip


Reply via email to