more Python3 fixes and minor changes
This commit is contained in:
parent
2cf3569fcb
commit
5dcc7d2fc6
6 changed files with 14 additions and 52 deletions
|
@ -1,5 +1,9 @@
|
|||
# loops/inst/loops/main.py
|
||||
|
||||
import sys
|
||||
from zope.securitypolicy import securitymap
|
||||
sys.modules['zope.app.securitypolicy.securitymap'] = securitymap
|
||||
|
||||
import waitress
|
||||
from zope.app.wsgi import config, getWSGIApplication
|
||||
|
||||
|
|
|
@ -895,6 +895,7 @@ class BaseView(GenericView, I18NView, SortableMixin):
|
|||
|
||||
@Lazy
|
||||
def xeditable(self):
|
||||
return False
|
||||
if self.typeOptions('no_external_edit'):
|
||||
return False
|
||||
ct = getattr(self.context, 'contentType', '')
|
||||
|
|
|
@ -1,28 +1,8 @@
|
|||
#
|
||||
# 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.browser.external
|
||||
|
||||
"""
|
||||
view class(es) for import/export.
|
||||
|
||||
$Id$
|
||||
""" view class(es) for import/export.
|
||||
"""
|
||||
|
||||
from zope.interface import Interface, implements
|
||||
from zope.app import zapi
|
||||
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
|
||||
from zope.cachedescriptors.property import Lazy
|
||||
|
|
|
@ -18,10 +18,6 @@
|
|||
<a href="#"
|
||||
tal:attributes="href string:${target/url}/@@configure.html"
|
||||
tal:content="target/title">Document xy</a>
|
||||
<tal:xedit define="xeditObjectUrl target/url"
|
||||
condition="target/xeditable">
|
||||
<metal:xedit use-macro="views/xedit_macros/editLink" />
|
||||
</tal:xedit>
|
||||
</tal:target>
|
||||
</div>
|
||||
|
||||
|
|
31
loops/external/external.py
vendored
31
loops/external/external.py
vendored
|
@ -1,30 +1,11 @@
|
|||
#
|
||||
# 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.external.external
|
||||
|
||||
"""
|
||||
Adapter implementations for export, import, ...
|
||||
""" Adapter implementations for export, import, ...
|
||||
|
||||
Obsolete, replaced by functionality in loops.external.base and other modules
|
||||
|
||||
$Id$
|
||||
"""
|
||||
|
||||
from zope.interface import implements, Interface
|
||||
from zope.interface import implementer, Interface
|
||||
from zope.app import zapi
|
||||
from zope.component import adapts
|
||||
|
||||
|
@ -76,9 +57,9 @@ class IExporter(Interface):
|
|||
|
||||
# implementations for views/nodes
|
||||
|
||||
@implementer(ILoader)
|
||||
class NodesLoader(object):
|
||||
|
||||
implements(ILoader)
|
||||
adapts(IViewManager)
|
||||
|
||||
def __init__(self, context):
|
||||
|
@ -99,9 +80,9 @@ class NodesLoader(object):
|
|||
parent[name] = node
|
||||
|
||||
|
||||
@implementer(IExporter)
|
||||
class NodesExporter(object):
|
||||
|
||||
implements(IExporter)
|
||||
adapts(IViewManager)
|
||||
|
||||
filename = 'loops.dmp'
|
||||
|
@ -140,9 +121,9 @@ class NodesExporter(object):
|
|||
file.close()
|
||||
|
||||
|
||||
@implementer(IExternalContentSource)
|
||||
class NodesImporter(object):
|
||||
|
||||
implements(IExternalContentSource)
|
||||
adapts(IViewManager)
|
||||
|
||||
filename = 'loops.dmp'
|
||||
|
|
|
@ -764,7 +764,7 @@ class IIsSubtype(IRelationAdapter):
|
|||
|
||||
|
||||
# probably not useful
|
||||
class xxIMappingAttributeRelation(IConceptSchema):
|
||||
class IMappingAttributeRelation(IConceptSchema):
|
||||
""" A relation based on a predicate ('mappingAttribute') that provides
|
||||
values for an attribute name on a parent and a corresponding
|
||||
identifiers on the the child objects that will be used as keys
|
||||
|
|
Loading…
Add table
Reference in a new issue