On 5 September 2011 20:04, brushek <luk...@chrustek.net> wrote: > Can anybody help ? or grid and smartgrid shouldn't be used with custom > fields ? > > I have tried your model and controller and get the following error when I try to use SQLFORM.smartgrid or -grid:
File "/home/js/web2py/applications/isi_proef/controllers/default.py" <http://localhost:8000/admin/default/edit/isi_proef/controllers/default.py>, line 71, in dodajserwer form = SQLFORM.smartgrid(db.serwery) File "/home/js/web2py/gluon/sqlhtml.py", line 1631, in smartgrid user_signature=user_signature,**kwargs) File "/home/js/web2py/gluon/sqlhtml.py", line 1386, in grid if field.type in ('string','text')]) TypeError: reduce() of empty sequence with no initial value The setup works with SQLTABLE so if I were you I would look at SOLIDTABLE as an alternative to SQLFORM.grid in this case. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a