You can also access the current user's identity information via the
tg variable. For example, in the master.kid file that is generated
from quickstart, you'll see:
<span py:if="tg.identity.anonymous">
<a href="/login">Login</a>
</span>
This will check whether the current identity is anonymous and offer a
link to Login.
On 29 Mar, 2006, at 7:11 am, Baruch wrote:
>
>
> Baruch wrote:
>> Two more data points:
>>
>> I removed the onload hack (switched to adding a script directly after
>> the form, will look into making this part of the widget)
>>
>> I also tried placing the same block inside the child template,
>> index.kid that extends master.kid. Inside the child template it works
>> perfectly and changes immediately on login/logout, on the master
>> template it doesn't change.
>
> I found this to be a problem of how I fetched the identity
> information.
> In order to save typing I had at the start:
>
> import sitetemplate, cherrypy
> identity = cherrypy.request.identity
>
> This saved the identity of the start user for all further accessess.
> I've switched to get it by a function that returns the full name.
>
> Baruch
>
>
>
--
Jeff Watkins
http://newburyportion.com/
Computers, they're just a fad.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---