works for me. can you try print vars and URL(vars=vars)?
On Monday, 10 February 2020 18:41:54 UTC-8, Toan Le wrote:
>
> Controller:
> def test():
> return H3("Hello")
>
> def grid():
> tablename = request.args(0) or "auth_user"
> if not tablename in db.tables: raise HTTP(403)
> grid = SQLFORM.smartgrid(db[tablename], args=[tablename],
> deletable=False, editable=False)
> return dict(grid=grid)
>
> View: grid.html
> {{=LOAD(f="test",vars=request.vars)}}
> {{=grid}}
>
>
> Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
>
> Traceback (most recent call last):
> File "C:\Users\toan7\OneDrive\web2py\gluon\restricted.py", line 219, in
> restricted
> exec(ccode, environment)
> File
> "C:\Users\toan7\OneDrive\web2py\applications\welcome\views\default/grid.html",
> line 181, in <module>
> File "C:\Users\toan7\OneDrive\web2py\gluon\compileapp.py", line 214, in LOAD
> vars and URL(vars=vars).split('?')[1] or ''
> IndexError: list index out of range
>
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/769a4e06-b0a0-4736-b45e-b991740cca58%40googlegroups.com.