I suppose technically, .is_local isn't really meaningful in the shell, as there is no HTTP request involved (.is_local refers to the source of an HTTP request). When the request object is created, .is_local defaults to False, and it is only set to True if an HTTP request comes in from localhost. Perhaps instead it should default to None and then set to either True or False in the case of a request. On the other hand, I suppose an argument could be made for explicitly setting it to True in the shell -- request.env.remote_addr is set to 127.0.0.1 in the shell, so setting .is_local to True would be consistent with that setting.
Anthony On Tuesday, April 29, 2014 6:36:51 PM UTC-4, Cássio Botaro wrote: > When i do request.is_local in shell, result is False but i'm at localhost. > Whats's the explanation? The correct should not be True? > > -- 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]. For more options, visit https://groups.google.com/d/optout.

