From 0427959012ee5e8abcb23ccf50f30037beee4a83 Mon Sep 17 00:00:00 2001 From: helmutm Date: Tue, 2 Sep 2008 14:15:15 +0000 Subject: [PATCH] fix process interface; add simple version handling git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2879 fd906abe-77d9-0310-91a1-e0d9ade77398 --- browser/common.py | 9 +++++++++ organize/process/definition.py | 3 ++- organize/process/interfaces.py | 10 +++++++--- version.py | 28 ++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 version.py diff --git a/browser/common.py b/browser/common.py index 4967379..ce8fc58 100644 --- a/browser/common.py +++ b/browser/common.py @@ -63,6 +63,7 @@ from loops.security.common import canAccessObject, canListObject, canWriteObject from loops.type import ITypeConcept from loops import util from loops.util import _ +from loops import version from loops.versioning.interfaces import IVersionable @@ -121,6 +122,14 @@ class BaseView(GenericView, I18NView): except ForbiddenAttribute: # ignore when testing pass + @Lazy + def versions(self): + return version.versions + + @Lazy + def longVersions(self): + return version.longVersions + def update(self): result = super(BaseView, self).update() self.checkLanguage() diff --git a/organize/process/definition.py b/organize/process/definition.py index 6e1958d..04677ae 100644 --- a/organize/process/definition.py +++ b/organize/process/definition.py @@ -30,10 +30,11 @@ from zope.interface import implements from zope.cachedescriptors.property import Lazy from cybertools.typology.interfaces import IType -from cybertools.process.interfaces import IProcess +#from cybertools.process.interfaces import IProcess from cybertools.process.definition import Process as BaseProcess from loops.interfaces import IConcept from loops.common import AdapterBase +from loops.organize.process.interfaces import IProcess from loops.type import TypeInterfaceSourceList diff --git a/organize/process/interfaces.py b/organize/process/interfaces.py index 5284f2e..7612261 100644 --- a/organize/process/interfaces.py +++ b/organize/process/interfaces.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2006 Helmut Merz helmutm@cy55.de +# Copyright (c) 2008 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,7 +27,11 @@ from zope import interface, component, schema from zope.i18nmessageid import MessageFactory from zope.security.proxy import removeSecurityProxy -from cybertools.process.interfaces import IProcessDefinition +from cybertools.process.interfaces import IProcess +from loops.interfaces import IConceptSchema +from loops.util import _ -_ = MessageFactory('zope') +class IProcess(IConceptSchema, IProcess): + + pass diff --git a/version.py b/version.py new file mode 100644 index 0000000..0e7a088 --- /dev/null +++ b/version.py @@ -0,0 +1,28 @@ +# +# Copyright (c) 2008 Helmut Merz helmutm@cy55.de +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +""" +loops version specifications. +""" + +revision = '$Id$' +shortVersion = '0.8' +longVersion = '%s-%s' % (shortVersion, ' '.join(revision.split()[2:5])) + +versions = dict(loops=shortVersion) +longVersions = dict(loops=longVersion)