durusmail: quixote-users: Mystery re ZODB Technique in vfab
Introducing myself, a small bug and RPMs for Quixote
2001-11-12
2001-11-12
2001-11-13
Seeking a Small Example of Forms/Widget Usage
2001-11-13
2001-11-13
2001-11-22
2001-11-22
2001-11-22
2001-11-23
Re: Seeking a Small Example of Forms/Widget Usage
2001-11-26
2001-11-26
2001-11-27
Mystery re ZODB Technique in vfab
2001-11-28
2001-11-28
An Example of Quixote/ZODB/Grouch Usage
2001-11-29
2001-11-13
Grouch and ZODB
2001-11-20
2001-11-21
2001-11-21
2001-11-21
2001-11-21
Mystery re ZODB Technique in vfab
Jeff Rush
2001-11-28
Can anyone knowledgeable about ZODB/Persistence explain why this
generates the error:

TypeError: unbound method __init__() must be called with instance as
first argument

---------- cut
class MXSessionManager (base.MXPersistent, SessionManager):

    def __init__(self):
        SessionManager.__init__(self)

obj = MXSessionManager()
---------- cut


but the following, included with Greg's examples works fine?

---------- cut
class MXSessionManager (base.MXPersistent, SessionManager):
    __SessionManager_init = SessionManager.__init__

    def __init__ (self):
        self.__SessionManager_init()

obj = MXSessionManager()
---------- cut

It's driving me crazy!

-Jeff

P.S I also found another gotcha.  The use of form tokens in Quixote's
forms class *requires* either an FCGI-based setup or a persistent
session manager, as the form tokens are discarded otherwise and you
get complaints about double submission of forms.

Hence the reason I'm trying to get a persistent session manager
working... ;-)

Suggestion: add a config conditional to disable form token checking
in a future Quixote release, for developers.