On Sat, Feb 18, 2012 at 3:53 PM, Andrey Popp <8may...@gmail.com> wrote:

> My use-case is
> different -- to allow User object to be attached on request without
> touching
> database (user id is encoded in authc cookie), but I think it should work
> for
> constructing lazy resource graph as well.
>

In Pyramid 1.3 I've updated the cookbook to directly support this idea of a
"lazy get" via attaching lazily evaluated properties to the request object.
You may consider it as an alternative to a custom Query class.

http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/auth/user_object.html#making-a-user-object-available-as-a-request-attribute

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to