[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [TurboGears] Re: error from sqlalchemy while using dojo in moviedemo Patricio Valarezo Sun Feb 05 07:00:24 2012

El 04/02/12 12:42, alind escribió:
I tried a simple application bu tit also dose not work. :(
#from sprox.tablebase import TableBase
from sprox.dojo.tablebase import DojoTableBase as TableBase
class BTable(TableBase):
     __model__ = BookTable
b_table = BTable(DBSession)

#from sprox.fillerbase import TableFiller
from sprox.dojo.fillerbase import DojoTableFiller as TableFiller
class BTableFiller(TableFiller):
     __model__ = BookTable
b_table_filler = BTableFiller(DBSession)

from tgext.crud import CrudRestController
class BController(CrudRestControl

from tgext.crud import CrudRestController
class BController(CrudRestController):
     model = BookTable
     table = b_table
     table_filler = b_table_filler

And here is the traceback

I have had the same problem, and I solved creating my own get_all method:

    def get_all(self):
return dict(tabla_form = tabla_usuario,valores=tabla_filler_usuario)

 and in the view:
<div py:content="tabla_form(value=valores.get_value())">values from table</div>

Note the get_value() call in valores, without it, I had a similar traceback as yours..

I hope it may help you.


Patricio Valarezo Lozano.
"las cosas no se hacen solas, alguien las tiene que hacer..."

You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at