2008-01-11

folder2pathadapter.py

  2008-01-11 19:14

...

### -*- coding: utf-8 -*- #############################################
#######################################################################
"""Product class for the Zope 3 based product package

$Id: product.py 12897 2007-11-10 15:32:08Z cray $
"""
__author__  = "Yegor Shershnev"
__license__ = "GPL"
__version__ = "$Revision: 12897 $"

from zope.interface import implements, implementedBy
from zope.app.container.interfaces import IContained
from pathadaptersimple.interfaces import IPath
from zope.component import adapts
from zope.interface import Interface
from pathadapter.any2pathadapter import Any2PathAdapter
from zope.app.folder.interfaces import IFolder

class Folder2PathAdapter(Any2PathAdapter) :

    implements(IPath)
    adapts(IFolder)    
    
    @property
    def path(self) :
        return IPath(IContained(self.context).__parent__).path
Официальный сайт Zope3 Московская группа изучения реактивного движения The Dream Bot Site noooxml