[svn] / z3 / Five / trunk / demo / FiveDemo / __init__.py Repository:
ViewVC logotype

View of /z3/Five/trunk/demo/FiveDemo/__init__.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46891 - (download) (as text) (annotate)
Wed Jun 16 12:54:00 2004 UTC (9 years, 10 months ago) by faassen
File size: 510 byte(s)
Initial import of Five. This is a cvs export of cvs.infrae.com/Five.
from Products.Five import zcml
import Products

def initialize(context):
    zcml.process('configure.zcml', package=Products.FiveDemo)

    # after everything is configured, we can use adapters
    
    from zope.component import getAdapter
    from classes import MyClass
    from interfaces import INewInterface
    
    object = MyClass()
    adapted = getAdapter(object, INewInterface)
    print adapted.anotherMethod()

    # shortcut
    adapted = INewInterface(object)
    print adapted.anotherMethod()

zope.org Infrastructure
ViewVC Help
Powered by ViewVC 1.0.3