Ok, I managed to find out the problem, but I don't know why it behaves as such.
The problem was, I had the word "admin" in the function. When I changed it to anything else, it would work with the routing code posted by Massimo here: https://groups.google.com/forum/#!topic/web2py/8KxcHTRIBWU On Friday, July 4, 2014 11:36:24 PM UTC+8, lyn2py wrote: > > Hi guys, > > It's me with another error (sorry)… I would avoid getting them if I could, > and I've tried looking in places to try to resolve, but nothing came up. > > On localhost, it works fine. On production, I'm getting "Invalid Request" > in big words, and nothing else loads. There is no error tickets, no weird > log entries, nothing, and the page only gave a 2-word message. > Where can I look to get some traceback or error? > > Production specs: Ubuntu, nginx, uwsgi > I have looked at the uwsgi logs, but there was nothing of use there. > > If it helps, this is the controller function I'm using that ran into > Invalid Request: > @auth.requires(auth.user_id==1, requires_login=True) > def admin_users(): > grid = SQLFORM.grid(db.auth_user) > response.view = 'default/admin_tpl.html' > return locals() > > > -- 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.