2009/5/2 大郎 <[email protected]>:
> On Sat, May 2, 2009 at 11:16 AM, Anand Chitipothu <[email protected]>
> wrote:
>>
>> web.ctx.env is available only when handling requests. Looks like you
>> are using it when initializing the application.
>
>
> yes, I think so.
> I use it in settings.py, when I need it:

You can directltt use web.ctx.HTTP_REFERRER wherever needed.
But if you want to use if only from setttings.py then write a function
that returns that

in settings.py:

def referrer():
    return web.ctx.HTTP_REFERRER

and use

settings.referrer()

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to