I have a problem with this version.

This does not work anymore:

    db.define_table('tabela', Field('campo'))
    form = SQLFORM.factory(db.tabela.campo)

I throws this:

Traceback (most recent call last):
  File "C:\Users\carlos.costa\Downloads\web2py\gluon\restricted.py", line 219, 
in restricted
    exec(ccode, environment)
  File 
"C:/Users/carlos.costa/Downloads/web2py/applications/teste/controllers/default.py"
 <http://127.0.0.1:8000/admin/default/edit/teste/controllers/default.py>, line 
66, in <module>
  File "C:\Users\carlos.costa\Downloads\web2py\gluon\globals.py", line 409, in 
<lambda>
    self._caller = lambda f: f()
  File 
"C:/Users/carlos.costa/Downloads/web2py/applications/teste/controllers/default.py"
 <http://127.0.0.1:8000/admin/default/edit/teste/controllers/default.py>, line 
13, in teste
    form = SQLFORM.factory(db.tabela.campo)
  File "C:\Users\carlos.costa\Downloads\web2py\gluon\sqlhtml.py", line 1919, in 
factory
    return SQLFORM(DAL(None).define_table(table_name, *fields),
  File 
"C:\Users\carlos.costa\Downloads\web2py\gluon\packages\dal\pydal\base.py", line 
587, in define_table
    table = self.lazy_define_table(tablename, *fields, **args)
  File 
"C:\Users\carlos.costa\Downloads\web2py\gluon\packages\dal\pydal\base.py", line 
599, in lazy_define_table
    table = table_class(self, tablename, *fields, **args)
  File 
"C:\Users\carlos.costa\Downloads\web2py\gluon\packages\dal\pydal\objects.py", 
line 351, in __init__
    field.bind(self)
  File 
"C:\Users\carlos.costa\Downloads\web2py\gluon\packages\dal\pydal\objects.py", 
line 1633, in bind
    'Field %s is already bound to a table' % self.longname)
ValueError: Field tabela.campo is already bound to a table



Em segunda-feira, 10 de julho de 2017 18:40:08 UTC-3, Massimo Di Pierro 
escreveu:
>
> It took a year. Thanks to everybody who contributed. There are a ton of 
> bug fixes and speed improvements.
>
> I would encourage everybody who contributed to add a comment in this 
> thread explaining the main features/improvements they have made.
>
> If anything does not work or was broken it is only fault and I will remedy 
> if reported.
>
> Massimo
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to