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'

Reply via email to