[Twisted-web] Remembering things in context from a Realm

Alex Levy mesozoic at polynode.com
Mon Sep 27 22:41:31 MDT 2004

I have a Realm class that does something akin to the following:

class MyRealm:
  def requestAvatar(self, id, mind, *interfaces):
    if IResource is in interfaces:
      user = figureOutWhoTheUserIs(id)
      resource = getResourceForUser(user)
      resource.remember(user, ICurrentUser)
      return (IResource, resource, lambda:None)
...and this doesn't seem to be working with the ubiquitous context. _Should_
it work, or do I need a new way to do something like this?

Help is appreciated; I'm trying hard to get back in the loop. :/

Alex Levy
WWW: http://mesozoic.geecs.org/
"Never let your sense of morals prevent you from doing what is right."
 -- Salvor Hardin, Isaac Asimov's _Foundation_

More information about the Twisted-web mailing list