Forums

ERR_TOO_MANY_REDIRECTS admin in web2py

Hi,

i already try 3 diferents web browsers and 2 diferents notebooks and i am getting this error

ERR_TOO_MANY_REDIRECTS

when i try to access my admin interface of web2py.

Could this be your case? - def user(): does not need @auth.requires_login() decorator.

If not, try to debug by checking redirection details (with browser web-dev net-tool)

My "def user()" do not have any decorator...

"There were too many redirects."

i did not change anything in my app... If I change to web2py welcome app i get the same error...

I think the problem is my "web2py/routes.py"

routers = dict( BASE = dict( default_application='ensaiosclinicos', functions = ["index", "sobre", "doacoes", "ensaios", "user", "download", "call", ] ) )

when i remove this file my admin works... but i was using without problems before...

Looks like this is either a bug in web2py or missing from it's docs. It keeps redirecting to (unavailable) site action/function, this can be seen in browser web-dev net-tool...

Try to add "site" to the list of valid functions, like this:

routers = dict( BASE = dict( default_application='ensaiosclinicos', functions = ["index", "sobre", "doacoes", "ensaios", "user", "download", "call", "site", ] ) )

Tho, I'm not a big fan of globally exposed Admin application!