What is logic of request.is_local?

I tried use it to prevent direct access to some included blocks:


def index():
    return dict()

def some_block():
    if request.is_local:
        do_smth()
        return dict(smth=smth)
    else:
        return None


index.html:
{{=LOAD('mycontroller', 'some_block', ajax=False)[0][0]}}

so, I thought, web2py load function with ajax=False is called locally,
and content of "some_block" will be available in index.html, but not
by url /mycontroller/some_block.html

But request.is_local returns False.

Is there any other way to do it?
(check some secret vars or args is not good)

Reply via email to