Yes indeed. But the quistion is, if this will be solved some day ? I can stick with old version for a while, but some day I will have to/ need to upgrade. The best of web2py was for me that it is backward compatible.
On 26 Sty, 11:51, Alan Etkin <spame...@gmail.com> wrote: > In this issue:http://code.google.com/p/web2py/issues/detail?id=634 > > I am trying to solve a (supposedly) similar problem, when using > SQLFORM with tables wich have custom id field names. Maybe there could > be used a common workaround to solve both problems. Anyway, the custom > id problem reproduces only in the new non-stable version. > > On 25 ene, 18:25, Omi Chiba <ochib...@gmail.com> wrote: > > > > > > > > > Sound like it's related to the issue I posted > > before.http://code.google.com/p/web2py/issues/detail?id=547 > > > The bottom line is you cannot use SQLFORM.grid/SQLTABLE if you don't > > have "id" field.I have also legacy table which doesn't have field > > called "id". I gave using SQLFORM.grid and create the list with > > <table></table>. If you're looking for paging, you can use the > > following plugin which I use. > > >http://dev.s-cubism.com/plugin_paginator > > > On Jan 25, 8:51 am, brushek <brus...@gmail.com> wrote: > > > > I'm using vim, editing files directly on server. > > > > On 25 Sty, 15:47, Marin Pranjić <marin.pran...@gmail.com> wrote: > > > > > What do you use for development? If you use an IDE with debugging > > > > step-by-step featues, you can find out where does "id" come from > > > > > On Wed, Jan 25, 2012 at 3:35 PM, brushek <brus...@gmail.com> wrote: > > > > > > On 25 Sty, 15:17, Anthony <abasta...@gmail.com> wrote: > > > > > > I left the following comment with the issue: > > > > > > > shop=SQLFORM.grid(db.gk_shop,fields=[db.gk_shop.id > > > > > ,db.gk_shop.nazwa_modulu],user_signature=False,deletable=False) > > > > > > > Note, your refer to db.gk_shop.id, but there is no "id" field in > > > > > > that > > > > > table. The name of the id field is actually db.gk_shop.id_modulo (the > > > > > field > > > > > _type_ is "id", but the field _name_ is "id_modulo"). In your code, > > > > > you > > > > > have to refer to the field name. > > > > > > > Anthony > > > > > > OK, I changed the controller: > > > > > > shop=SQLFORM.grid(db.gk_shop,fields=[db.gk_shop.id_modulu,db.gk_shop.nazwa_ > > > > > modulu],user_signature=False,deletable=False) > > > > > > and it isn't the case, the error still remain: > > > > > > Traceback (most recent call last): > > > > > File "/home/users/brushek/web2py-dev/gluon/restricted.py", line 204, > > > > > in restricted > > > > > exec ccode in environment > > > > > File "/home/users/brushek/web2py-dev/applications/sdadmin/ > > > > > controllers/default.py", line 138, in <module> > > > > > File "/home/users/brushek/web2py-dev/gluon/globals.py", line 172, in > > > > > <lambda> > > > > > self._caller = lambda f: f() > > > > > File "/home/users/brushek/web2py-dev/gluon/tools.py", line 2551, in > > > > > f > > > > > return action(*a, **b) > > > > > File "/home/users/brushek/web2py-dev/applications/sdadmin/ > > > > > controllers/default.py", line 16, in shop > > > > > > shop=SQLFORM.grid(db.gk_shop,fields=[db.gk_shop.id_modulu,db.gk_shop.nazwa_ > > > > > modulu],user_signature=False,deletable=False) > > > > > File "/home/users/brushek/web2py-dev/gluon/sqlhtml.py", line 1587, > > > > > in grid > > > > > _class='web2py_form', > > > > > File "/home/users/brushek/web2py-dev/gluon/html.py", line 1960, in > > > > > process > > > > > self.validate(**kwargs) > > > > > File "/home/users/brushek/web2py-dev/gluon/html.py", line 1907, in > > > > > validate > > > > > if self.accepts(**kwargs): > > > > > File "/home/users/brushek/web2py-dev/gluon/sqlhtml.py", line 1042, > > > > > in accepts > > > > > formname_id = '.'.join(str(self.record[k]) > > > > > File "/home/users/brushek/web2py-dev/gluon/dal.py", line 5317, in > > > > > __getattr__ > > > > > 'firebird': FireBirdAdapter, > > > > > File "/home/users/brushek/web2py-dev/gluon/dal.py", line 5308, in > > > > > __getitem__ > > > > > 'postgres': PostgreSQLAdapter, > > > > > KeyError: 'id'