Massimo, i have tried but can't reproduce the error, maybe this was my bad.
Sorry for the trouble. On Tue, 14 Nov 2017 11:33:15 -0800 (PST) Massimo Di Pierro <[email protected]> wrote: > Can you send me a simple app to reproduce the problem. > > On Tuesday, 14 November 2017 12:20:03 UTC-6, Yoel Benitez Fonseca > wrote: > > > > Got some strange result after the updates... im ussing pytest for > > testing and the was a test for a submit form with was working últil > > the update, the model: > > > > db.define_table( > > 'producto', > > Field('nombre', 'string', length=50, unique=True, > > label='Nombre:'), > > Field('tipo_producto_id', 'reference tipo_producto', > > label='Tipo:'), > > Field('precio', 'float', label='Precio:'), > > Field('descripcion', 'text', length=1250, > > label='Descripción:'), Field('imagen', 'upload', label='Imagen:'), > > Field('thumb', 'upload', writable=False, readable=False), > > format='%(nombre)s') > > > > The test will fail for db.tipo_producto_id allowing not in db > > reference....until i got the to the code and explicity put the > > validator: > > > > db.producto.tipo_producto_id.requires = IS_IN_DB( > > db, 'tipo_producto.id', '%(nombre)s' > > ) > > > > idk what was that about... other models defined on the app and not > > defining explicid validator work as usual. > > > > 2017-11-14 10:01 GMT-05:00 Massimo Di Pierro > > <[email protected]>: > > > check your models/menu.py you may have separators in the menu. > > > The new layout does not support them. > > > > > > > > > On Tuesday, 14 November 2017 02:22:51 UTC-6, 黄祥 wrote: > > >> > > >> Traceback (most recent call last): > > >> File > > >> "/Users/MacBookPro/project/python/web2py/gluon/restricted.py", > > line > > >> 219, in restricted > > >> exec(ccode, environment) > > >> File > > >> > > "/Users/MacBookPro/project/python/web2py/applications/test/views/default/index.html", > > > > > > >> line 60, in <module> > > >> File "/Users/MacBookPro/project/python/web2py/gluon/html.py", > > >> line > > 783, > > >> in __getitem__ > > >> return self.components[i] > > >> IndexError: list index out of range > > >> > > >> views/default/index.html > > >> {{extend 'layout.html'}} > > >> {{include 'templates/index/index.html'}} > > >> > > >> views/templates/index/index.html > > >> {{=H1(T('Test'), _align = 'Center' ) }} > > >> > > >> code in traceback line 60 is italic and bold: > > >> for _item in response.menu or []: > > >> response.write('\n ', escape=False) > > >> if len(_item)<4 or not _item[3]: > > >> response.write('\n <li class="nav-item ', > > escape=False) > > >> if _item[1]: > > >> response.write('active', escape=False) > > >> pass > > >> response.write('">\n <a class="nav-link" > > >> href="', escape=False) > > >> response.write(_item[2]) > > >> response.write('">', escape=False) > > >> response.write(_item[0]) > > >> response.write('</a>\n </li>\n ', > > escape=False) > > >> else: > > >> response.write('\n <li class="nav-item > > >> dropdown">\n <a class="nav-link dropdown-toggle" href="', > > >> escape=False) response.write(_item[2]) > > >> response.write('" data-toggle="dropdown" > > >> aria-haspopup="true" aria-expanded="false">', escape=False) > > >> response.write(_item[0]) > > >> response.write('</a>\n <div > > >> class="dropdown-menu">\n ', escape=False) > > >> for _subitem in _item[3]: > > >> response.write('\n <a > > >> class="dropdown-item" href="', escape=False) > > >> response.write(_subitem[2]) > > >> response.write('">', escape=False) > > >> response.write(_subitem[0]) > > >> response.write('</a>\n ', escape=False) > > >> pass > > >> response.write('\n </div>\n </li>\n > > >> ', escape=False) > > >> pass > > >> response.write('\n ', escape=False) > > >> pass > > > > > > -- > > > 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 [email protected]. > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > -- > > Msc. Yoel Benítez Fonseca > > Dpto. Informática. Redacción Adelante > > http://www.adelante.cu/ > > > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

