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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/2b8a42ce-19a4-4a5d-969f-d015eaf2ec53%40googlegroups.com.

Reply via email to