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