Good afternoon:

I'm using the plugin_datatable and I have an error by doing the
following:

the controller

left=db.clientes.on(db.accountcode.id_clientes==db.clientes.id)
   rws=db().select(db.accountcode.ani, db.clientes.rsocial, left=left,
orderby=db.clientes.rsocial)
   table=SQLTABLE(rws,truncate=60)

in view

{{=plugin_datatable(table,_class='dataTables')}}


The error is as follows


Error traceback

Traceback (most recent call last):
  File "/home/marcelo/web2py/gluon/restricted.py", line 178, in
restricted
    exec ccode in environment
  File "/home/marcelo/web2py/applications/administrador/views/default/
lineas.html", line 76, in <module>
  File "/home/marcelo/web2py/applications/administrador/models/
plugin_datatable.py", line 9, in plugin_datatable
    SQLTABLE(rows,**attributes))
  File "/home/marcelo/web2py/gluon/sqlhtml.py", line 1082, in __init__
    columns = sqlrows.colnames
AttributeError: 'SQLTABLE' object has no attribute 'colnames'



Question

As you solve this problem.

Reply via email to