[Zope-PTK] Solved?! (Can't import DemoPortal.zexp)
Dan L. Pierson
dan@sol.control.com
Thu, 22 Jun 2000 09:13:31 -0400 (EDT)
Jonathan writes:
> >The problem is that someone has removed the PersistentUserSource file from
> >PTKDemo, where MemberMixIn resides. I tired adding it back myself but that
> >doesn't help...
>
> Solved it more or less (I hope). It imports and adds a 'Portal' to
> the list of available objects. Here's how:
>
> - Copy 'PersistentUserSource.py' from 'Membership'
> to 'PTKDemo' (both in your products folder)
> - Open '__init__.py' in 'PTKDemo'
> - Add 'PersistentUserSource' to import
> - Add the following code below the membership classes:
>
> context.registerBaseClass(PersistentUserSource.MemberMixin,
> '_ZClass_for_MemberMixin')
>
> I am not sure that's how it's supposed to work, but it works so far :)
The trouble is that things are transitioning now until Kevin decides
that Membership is OK. Then what needs to happen is:
1. PTK requires Membership as well as LoginManager/ZPatterns.
2. DemoPortal.zexp is changed to use MemberMixin from Membership.
For now, I might try to replace the PersistentUserSource.py in PTKDemo
with a dummy file that just imports the one from Membership to avoid
keeping the two in sync.