[Zope3-Users] Direct ZODB access in a Zope3 instance

Lennart Regebro regebro at gmail.com
Fri Dec 2 03:42:38 EST 2005


On 12/1/05, Brad Allen <brad at allendev.com> wrote:
> The self.context is used in a mysterious way here. Nothing in
> the class definition binds it.

Well, the MessageDetails class is used as a mix-in into a
BrowserViewClass. The browser views init does:

    def __init__(self, context, request):
        self.context = context
        self.request = request

Request is created by the publisher, and context is the object which is viewed.

> I guess I should
> expect a child class, or a factory maybe to add the self.context
> when the class get instantiated.

Yup, that's pretty much it.


More information about the Zope3-users mailing list