This sounds crazy but I'm getting an error 404 when using in the same function this lines together:
test = db.test(request.args(0,cast=int, otherwise=URL('index'))) or redirect(URL('index')) grid = SQLFORM.grid(db(db.test.id == 2), deletable=False, editable=True) When I comment either one of the lines, the function returns the correct values for test and grid. When put together, it doesn't work and I get redirected or a 404 error. the complete escenario is: Request: http://127.0.0.1/gk/default/testArg/1 Model: db.define_table('test', Field('nombre', 'string', unique=True, label='Nombre'), Field('gerencia', label='Gerencia'), Field('equipo', label='Equipo'), Field('vigencia', 'date', label='Vigencia'), format = '%(nombre)s' ) Controler: @auth.requires_login() def testArg(): test = db.test(request.args(0,cast=int, otherwise=URL('index'))) or redirect(URL('index')) grid = SQLFORM.grid(db(db.test.id == 2))#, deletable=False, editable=True) return locals() View: generic.html Am I missing something really obvious? David. -- 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/8e05d374-8497-4818-b6e3-e84df61dc4be%40googlegroups.com.