[Twisted-web] Nevow: How to use sessions?

Valentino Volonghi dialtone at gmail.com
Wed Dec 15 05:00:55 MST 2004

On Wed, 15 Dec 2004 11:25:36 +0100, Andrea Arcangeli
<andrea at cpushare.com> wrote:
> It helped a lot thanks. I assume UserManager must inherit compy.Adapter
> and IIUserManager must inherit compy.Interface.

True but not necessary. I mean, UserManager can also inherit from
another class that accepts an argument 'original' in its constructor.
> I've some more question ;)
[snip on a question I didn't actually understood very well]

> 2) am I right I can vary the length of a session with something like
> this?
>         nevow_resource = guard.SessionWrapper(portal_obj)
>         nevow_resource.sessionLifetime = 300

Yes you are right. Since sessionLifetime is a class attribute you can
also do that before instantiating it.
> 3) what is the difference between compy.Interface and
> components.Interface?

String registration capability. If you are using zope.interface you
should look at compyCompat which is a lot shorter than compy.
I don't know if the string registration patch from Donovan has been
merged in Twisted actually, but compy was just an hacked version of
components. Currently compyCompat.Interface and components.Interface
are the same zope.interface.Interface.

Valentino Volonghi aka Dialtone
Now running MacOS X 10.3.6
Blog: http://vvolonghi.blogspot.com
Home Page: http://xoomer.virgilio.it/dialtone/

More information about the Twisted-web mailing list