I am not completely sure I understand the request so I give you three
solutions.
1) you can find the ip of the client in request.client
2) if you are talking about navigation you can store the latest path
in the session. At the top of controller write
def mycaller(x): y=x();
session.last_path_info=request.env.path_info; return y
response._caller=mycaller
if request.function=='doSomething' and session.last_path_info!='/
myapp/controller/doSomething': redirect SOMEWHERE
3) look in the request.env.http_refereer field
On Oct 20, 2:24 am, dolphin <[EMAIL PROTECTED]> wrote:
> Hi,I have a problem.
> For example,there is a controller controller.py:
> def doSomething():
> return "you can access to the function"
>
> I don't want everyone call this function,but he can call it by the
> url(http://localhost:8000/myapp/controller/doSomething).Howcan I
> prevent this?
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---