michal schrieb:
> I'm new in TG, so please excuse narrow mindness of my question. Could
> anyone kindly give me a hint how to implement something like "user's
> last login" in TG1 framework? Assuming "User" class in model.py with
> attribute "last_login" as DateTimeCol. I'm quite lost, since "login"
> function from quickstart can possibly forward any url with parameters
> to any functions with expose decorator in controller.

I think you need to write a custom identity provider and overwrite the
validate_identity() method of it to set e.g. a 'last_login' attribute on
the user.

The documentation on this is a little scarce, but see the following pages:

http://docs.turbogears.org/1.0/IdentityRecipes
http://docs.turbogears.org/1.0/EntryPointList

I have a demo project with a custom identity provider, which does
something very similar (records the number of failed login attempts). It
works with TG 1.1, I'm not sure about TG 1.0.x. I have uploaded it as an
attachment to the IdentityRecipes page (see section "Implementing a
Custom Identity Provider").


HTH, Chris



--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to