fix process interface; add simple version handling

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2879 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2008-09-02 14:15:15 +00:00
parent fee8b42366
commit 0427959012
4 changed files with 46 additions and 4 deletions

View file

@ -63,6 +63,7 @@ from loops.security.common import canAccessObject, canListObject, canWriteObject
from loops.type import ITypeConcept from loops.type import ITypeConcept
from loops import util from loops import util
from loops.util import _ from loops.util import _
from loops import version
from loops.versioning.interfaces import IVersionable from loops.versioning.interfaces import IVersionable
@ -121,6 +122,14 @@ class BaseView(GenericView, I18NView):
except ForbiddenAttribute: # ignore when testing except ForbiddenAttribute: # ignore when testing
pass pass
@Lazy
def versions(self):
return version.versions
@Lazy
def longVersions(self):
return version.longVersions
def update(self): def update(self):
result = super(BaseView, self).update() result = super(BaseView, self).update()
self.checkLanguage() self.checkLanguage()

View file

@ -30,10 +30,11 @@ from zope.interface import implements
from zope.cachedescriptors.property import Lazy from zope.cachedescriptors.property import Lazy
from cybertools.typology.interfaces import IType 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 cybertools.process.definition import Process as BaseProcess
from loops.interfaces import IConcept from loops.interfaces import IConcept
from loops.common import AdapterBase from loops.common import AdapterBase
from loops.organize.process.interfaces import IProcess
from loops.type import TypeInterfaceSourceList from loops.type import TypeInterfaceSourceList

View file

@ -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 # 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 # 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.i18nmessageid import MessageFactory
from zope.security.proxy import removeSecurityProxy 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

28
version.py Normal file
View file

@ -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)