some more Python3 fixes...
This commit is contained in:
parent
b8eba239ed
commit
9fbd97386e
14 changed files with 57 additions and 266 deletions
|
@ -2,8 +2,6 @@
|
|||
Yet Another WikiWiki Framework
|
||||
==============================
|
||||
|
||||
($Id$)
|
||||
|
||||
>>> from zope import component
|
||||
>>> from zope.publisher.browser import TestRequest
|
||||
|
||||
|
@ -33,7 +31,7 @@ We format the content of the start page using the restructured text format.
|
|||
The parser for restructured text and a corresponding HTML writer are the
|
||||
default plugins used, so we can already render the page as HTML.
|
||||
|
||||
>>> print startPage.render(TestRequest())
|
||||
>>> print(startPage.render(TestRequest()))
|
||||
<p><strong>Welcome to the Demo Wiki</strong></p>
|
||||
|
||||
Links to existing pages
|
||||
|
@ -50,7 +48,7 @@ We now create another page that contains a link to the start page.
|
|||
... `Back to the Start Page <start_page>`_
|
||||
... '''
|
||||
|
||||
>>> print aboutPage.render(TestRequest())
|
||||
>>> print(aboutPage.render(TestRequest()))
|
||||
<p><strong>Information about the Demo Wiki</strong></p>
|
||||
<p>This is the cybertools demo wiki.</p>
|
||||
<p><a class="reference"
|
||||
|
@ -77,7 +75,7 @@ should lead to a view that will create the page.
|
|||
>>> aboutPage.text += '''
|
||||
... `More... <more>`_
|
||||
... '''
|
||||
>>> print aboutPage.render(TestRequest())
|
||||
>>> print(aboutPage.render(TestRequest()))
|
||||
<p><strong>Information about the Demo Wiki</strong></p>
|
||||
<p>This is the cybertools demo wiki.</p>
|
||||
<p><a class="reference"
|
||||
|
@ -91,7 +89,7 @@ rendering operations.
|
|||
>>> len(links)
|
||||
2
|
||||
|
||||
>>> print aboutPage.render(TestRequest())
|
||||
>>> print(aboutPage.render(TestRequest()))
|
||||
<p>...
|
||||
<p><a class="reference create"
|
||||
href="http://127.0.0.1/demo_wiki/@@create.html?name=more">?More...</a></p>
|
||||
|
@ -110,7 +108,7 @@ Links with fragments (anchor references) and parameters
|
|||
... - `More content <more#content?language=en>`_
|
||||
... '''
|
||||
|
||||
>>> print referencePage.render(TestRequest())
|
||||
>>> print(referencePage.render(TestRequest()))
|
||||
<h1 class="title">References</h1>
|
||||
<ul class="simple">
|
||||
<li><a class="reference"
|
||||
|
@ -132,7 +130,7 @@ External links
|
|||
|
||||
An absolute URL given as link target will not be changed in the process.
|
||||
|
||||
>>> print linksPage.render(TestRequest())
|
||||
>>> print(linksPage.render(TestRequest()))
|
||||
<p><strong>A collection of interesting links</strong></p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference"
|
||||
|
@ -148,7 +146,7 @@ Nevertheless the links are registered in the link manager.
|
|||
When we render external links repeatedly no new link objects will be
|
||||
created.
|
||||
|
||||
>>> print linksPage.render(TestRequest())
|
||||
>>> print(linksPage.render(TestRequest()))
|
||||
<p><strong>A collection of interesting links</strong></p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference"
|
||||
|
@ -187,7 +185,7 @@ Embed media objects (images) in Wiki text
|
|||
... `Back to the Start Page <start_page>`_
|
||||
... '''
|
||||
|
||||
>>> print imagePage1.render(TestRequest())
|
||||
>>> print(imagePage1.render(TestRequest()))
|
||||
<p><strong>A page with an image</strong></p>
|
||||
<img src="http://127.0.0.1/demo_wiki/.media/media01.jpg" />
|
||||
<p><a class="reference"
|
||||
|
@ -205,7 +203,7 @@ Link to media objects (files) in Wiki text
|
|||
... `Back to the Start Page <start_page>`_
|
||||
... '''
|
||||
|
||||
>>> print imagePage2.render(TestRequest())
|
||||
>>> print(imagePage2.render(TestRequest()))
|
||||
<p><strong>A page with a link to an image</strong></p>
|
||||
<p><a class="reference"
|
||||
href="http://127.0.0.1/demo_wiki/.media/media01.jpg">Media Object #1</a></p>
|
||||
|
|
|
@ -1,36 +1,16 @@
|
|||
#
|
||||
# Copyright (c) 2009 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
|
||||
#
|
||||
# cybertools.wiki.base.config
|
||||
|
||||
"""
|
||||
Basic Configuration implementations.
|
||||
|
||||
$Id$
|
||||
""" Basic Configuration implementations.
|
||||
"""
|
||||
|
||||
from zope.interface import implements
|
||||
from zope.interface import implementer
|
||||
|
||||
from cybertools.wiki.interfaces import IWikiConfigInfo, IWikiConfiguration
|
||||
|
||||
|
||||
@implementer(IWikiConfigInfo)
|
||||
class WikiConfigInfo(dict):
|
||||
|
||||
implements(IWikiConfigInfo)
|
||||
|
||||
def set(self, functionality, value):
|
||||
self[functionality] = value
|
||||
|
||||
|
@ -52,12 +32,11 @@ class BaseConfigurator(object):
|
|||
return self.context._configInfo
|
||||
|
||||
|
||||
@implementer(IWikiConfiguration)
|
||||
class BaseConfiguration(object):
|
||||
""" The base class for all wiki configuration implementations.
|
||||
"""
|
||||
|
||||
implements(IWikiConfiguration)
|
||||
|
||||
configurator = BaseConfigurator
|
||||
|
||||
_configInfo = None
|
||||
|
|
|
@ -1,40 +1,20 @@
|
|||
#
|
||||
# Copyright (c) 2010 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
|
||||
#
|
||||
# cybertools.wiki.base.link
|
||||
|
||||
"""
|
||||
Basic (sample) implementations for links and link management.
|
||||
|
||||
$Id$
|
||||
""" Basic (sample) implementations for links and link management.
|
||||
"""
|
||||
|
||||
from docutils.nodes import Text
|
||||
from zope.interface import implements
|
||||
from zope.interface import implementer
|
||||
from zope.traversing.browser import absoluteURL
|
||||
|
||||
from cybertools.link.interfaces import ILink, ILinkManager
|
||||
from cybertools.wiki.interfaces import ILinkProcessor
|
||||
|
||||
|
||||
@implementer(ILinkProcessor)
|
||||
class LinkProcessor(object):
|
||||
""" Abstract base class. """
|
||||
|
||||
implements(ILinkProcessor)
|
||||
|
||||
source = request = None
|
||||
targetName = ''
|
||||
|
||||
|
|
|
@ -1,37 +1,18 @@
|
|||
#
|
||||
# Copyright (c) 2010 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
|
||||
#
|
||||
# cybertools.wiki.base.media
|
||||
|
||||
"""
|
||||
Basic (sample) implementation for a wiki media manager and media objects.
|
||||
|
||||
$Id$
|
||||
""" Basic (sample) implementation for a wiki media manager and media objects.
|
||||
"""
|
||||
|
||||
from zope.component import adapts
|
||||
from zope.interface import implements
|
||||
from zope.interface import implementer
|
||||
from zope.traversing.browser import absoluteURL
|
||||
from cybertools.wiki.interfaces import IWiki, IMediaManager, IMediaObject
|
||||
|
||||
|
||||
@implementer(IMediaManager)
|
||||
class WikiMediaManager(object):
|
||||
""" A Wiki adapter for providing media manager functionality. """
|
||||
|
||||
implements(IMediaManager)
|
||||
adapts(IWiki)
|
||||
|
||||
name = '.media'
|
||||
|
@ -62,11 +43,10 @@ class WikiMediaManager(object):
|
|||
return self.objects.values()
|
||||
|
||||
|
||||
@implementer(IMediaObject)
|
||||
class MediaObject(object):
|
||||
""" A basic (maybe persistent) media object. """
|
||||
|
||||
implements(IMediaObject)
|
||||
|
||||
data = None
|
||||
|
||||
def __init__(self, name, title=None, parent=None):
|
||||
|
|
|
@ -1,29 +1,10 @@
|
|||
#
|
||||
# Copyright (c) 2010 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
|
||||
#
|
||||
# cybertools.wiki.base.wiki
|
||||
|
||||
"""
|
||||
A Wiki manager managing wikis and wiki-related objects, esp plugins.
|
||||
|
||||
$Id$
|
||||
""" A Wiki manager managing wikis and wiki-related objects, esp plugins.
|
||||
"""
|
||||
|
||||
from zope import component
|
||||
from zope.interface import implements
|
||||
from zope.interface import implementer
|
||||
from zope.intid.interfaces import IIntIds
|
||||
from zope.traversing.browser import absoluteURL
|
||||
|
||||
|
@ -35,10 +16,9 @@ from cybertools.wiki.interfaces import IParser, IWriter
|
|||
from cybertools.wiki.base.config import BaseConfiguration
|
||||
|
||||
|
||||
@implementer(IWikiManager)
|
||||
class WikiManager(BaseConfiguration):
|
||||
|
||||
implements(IWikiManager)
|
||||
|
||||
def __init__(self):
|
||||
self.setup()
|
||||
|
||||
|
@ -91,7 +71,7 @@ class WikiManager(BaseConfiguration):
|
|||
return obj
|
||||
|
||||
def resolveUid(self, uid):
|
||||
if isinstance(uid, basestring):
|
||||
if isinstance(uid, str):
|
||||
if ':' in uid:
|
||||
protocol, address = uid.split(':', 1)
|
||||
if protocol.lower() in protocols:
|
||||
|
@ -106,10 +86,9 @@ class WikiManager(BaseConfiguration):
|
|||
return component.getUtility(IWikiConfiguration)
|
||||
|
||||
|
||||
@implementer(IWiki)
|
||||
class Wiki(BaseConfiguration):
|
||||
|
||||
implements(IWiki)
|
||||
|
||||
manager = None
|
||||
|
||||
def __init__(self, name, title=None):
|
||||
|
@ -164,10 +143,9 @@ class Wiki(BaseConfiguration):
|
|||
return self.getManager()
|
||||
|
||||
|
||||
@implementer(IWikiPage)
|
||||
class WikiPage(BaseConfiguration):
|
||||
|
||||
implements(IWikiPage)
|
||||
|
||||
wiki = None
|
||||
text = u''
|
||||
|
||||
|
|
|
@ -1,28 +1,9 @@
|
|||
#
|
||||
# Copyright (c) 2009 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
|
||||
#
|
||||
# cybertools.wiki.common
|
||||
|
||||
"""
|
||||
Common basic generic stuff.
|
||||
|
||||
$Id$
|
||||
""" Common basic generic stuff.
|
||||
"""
|
||||
|
||||
from zope.interface import implements
|
||||
from zope.interface import implementer
|
||||
|
||||
from cybertools.wiki.interfaces import IWebResource
|
||||
|
||||
|
@ -31,10 +12,9 @@ protocols = set(['dav', 'file', 'ftp', 'http', 'https', 'javascript',
|
|||
'mailto', 'sftp', 'smb'])
|
||||
|
||||
|
||||
@implementer(IWebResource)
|
||||
class ExternalPage(object):
|
||||
|
||||
implements(IWebResource)
|
||||
|
||||
def __init__(self, uid):
|
||||
self.uid = uid
|
||||
|
||||
|
|
|
@ -1,32 +1,13 @@
|
|||
#
|
||||
# Copyright (c) 2010 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
|
||||
#
|
||||
# cybertools.wiki.dcu.html
|
||||
|
||||
"""
|
||||
A writer implementation based on the docutils HTML writer.
|
||||
|
||||
$Id$
|
||||
""" A writer implementation based on the docutils HTML writer.
|
||||
"""
|
||||
|
||||
from docutils.core import publish_from_doctree
|
||||
from docutils import nodes
|
||||
from docutils.writers.html4css1 import HTMLTranslator, Writer as HTMLWriter
|
||||
from zope import component
|
||||
from zope.interface import implements
|
||||
from zope.interface import implementer
|
||||
|
||||
from cybertools.wiki.interfaces import INodeProcessor, IWriter
|
||||
|
||||
|
@ -39,10 +20,9 @@ class HTMLWriter(HTMLWriter):
|
|||
return template % subs
|
||||
|
||||
|
||||
@implementer(IWriter)
|
||||
class Writer(object):
|
||||
|
||||
implements(IWriter)
|
||||
|
||||
def __init__(self):
|
||||
self.writer = HTMLWriter()
|
||||
self.writer.translator_class = BodyTranslator
|
||||
|
|
|
@ -1,32 +1,12 @@
|
|||
#
|
||||
# Copyright (c) 2009 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
|
||||
#
|
||||
# cybertools.wiki.dcu.process
|
||||
|
||||
"""
|
||||
Node processor implementations for docutils nodes.
|
||||
|
||||
$Id: process.py 3153 2009-01-17 16:51:09Z helmutm $
|
||||
""" Node processor implementations for docutils nodes.
|
||||
"""
|
||||
|
||||
from docutils.nodes import Text
|
||||
from zope import component
|
||||
from zope.cachedescriptors.property import Lazy
|
||||
from zope.component import adapts
|
||||
from zope.interface import implements
|
||||
|
||||
from cybertools.wiki.base.link import LinkProcessor
|
||||
from cybertools.wiki.dcu.html import HTMLImageNode, HTMLReferenceNode
|
||||
|
|
|
@ -1,37 +1,17 @@
|
|||
#
|
||||
# Copyright (c) 2009 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
|
||||
#
|
||||
# cybertools.wiki.dcu.rstx
|
||||
|
||||
"""
|
||||
A parser implementation based on the docutils restructured text parser.
|
||||
|
||||
$Id$
|
||||
""" A parser implementation based on the docutils restructured text parser.
|
||||
"""
|
||||
|
||||
from docutils.core import publish_doctree
|
||||
from zope.interface import implements
|
||||
from zope.interface import implementer
|
||||
|
||||
from cybertools.wiki.interfaces import IParser
|
||||
|
||||
|
||||
@implementer(IParser)
|
||||
class Parser(object):
|
||||
|
||||
implements(IParser)
|
||||
|
||||
def parse(self, text, context=None, request=None):
|
||||
tree = publish_doctree(text)
|
||||
tree.context = context
|
||||
|
|
|
@ -1,25 +1,6 @@
|
|||
#
|
||||
# Copyright (c) 2011 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
|
||||
#
|
||||
# cybertools.wiki.generic.adapter
|
||||
|
||||
"""
|
||||
Wiki implementation = adapters for Zope2 content objects.
|
||||
|
||||
$Id$
|
||||
""" Wiki implementation = adapters for Zope2 content objects.
|
||||
"""
|
||||
|
||||
try:
|
||||
|
@ -32,7 +13,7 @@ from persistent.mapping import PersistentMapping
|
|||
from zope.cachedescriptors.property import Lazy
|
||||
from zope import component
|
||||
from zope.component import adapts
|
||||
from zope.interface import implements
|
||||
from zope.interface import implementer
|
||||
from zope.intid import IntIds
|
||||
from zope.intid.interfaces import IIntIds
|
||||
|
||||
|
@ -45,10 +26,9 @@ from cybertools.wiki.base.wiki import WikiPage as BaseWikiPage
|
|||
from cybertools.wiki.interfaces import ILinkManager, IWikiConfigInfo
|
||||
|
||||
|
||||
@implementer(IWikiConfigInfo)
|
||||
class PersistentConfigInfo(PersistentMapping):
|
||||
|
||||
implements(IWikiConfigInfo)
|
||||
|
||||
def set(self, functionality, value):
|
||||
self[functionality] = value
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
Standard Wiki Pre-processors
|
||||
============================
|
||||
|
||||
($Id$)
|
||||
|
||||
|
||||
MediaWiki Formatting
|
||||
====================
|
||||
|
@ -24,6 +22,6 @@ Embedding of Images
|
|||
|
||||
>>> src = '''[[image:media01.jpg]]'''
|
||||
|
||||
>>> print preprocess(src)
|
||||
>>> print(preprocess(src))
|
||||
.. image:: media01.jpg
|
||||
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
#! /usr/bin/python
|
||||
# cybertools.wiki.tests
|
||||
|
||||
"""
|
||||
Tests for the 'cybertools.wiki' package.
|
||||
|
||||
$Id$
|
||||
""" Tests for the 'cybertools.wiki' package.
|
||||
"""
|
||||
|
||||
import unittest, doctest
|
||||
from zope import component
|
||||
from zope.interface import implements
|
||||
from zope.interface import implementer
|
||||
from zope.intid.interfaces import IIntIds
|
||||
from zope.publisher.interfaces.browser import IBrowserRequest
|
||||
from zope.traversing.browser.interfaces import IAbsoluteURL
|
||||
|
@ -25,10 +22,9 @@ from cybertools.wiki.interfaces import IWiki, IWikiPage, IMediaObject
|
|||
#from cybertools.wiki.tracking import link
|
||||
|
||||
|
||||
@implementer(IAbsoluteURL)
|
||||
class WikiURL(object):
|
||||
|
||||
implements(IAbsoluteURL)
|
||||
|
||||
def __init__(self, context, request):
|
||||
self.context = context
|
||||
self.request = request
|
||||
|
|
|
@ -1,25 +1,6 @@
|
|||
#
|
||||
# Copyright (c) 2011 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
|
||||
#
|
||||
# cybertools.xedit.browser
|
||||
|
||||
"""
|
||||
(View) class(es) for the external editor functionality.
|
||||
|
||||
$Id$
|
||||
""" (View) class(es) for the external editor functionality.
|
||||
"""
|
||||
|
||||
from zope.app.pagetemplate import ViewPageTemplateFile
|
||||
|
@ -49,7 +30,7 @@ class ExternalEditorView(object):
|
|||
r.append('title:' + fromUnicode(context.title))
|
||||
auth = self.request.get('_auth')
|
||||
if auth:
|
||||
print 'ExternalEditorView: auth = ', auth
|
||||
print('ExternalEditorView: auth = ', auth)
|
||||
if auth.endswith('\n'):
|
||||
auth = auth[:-1]
|
||||
r.append('auth:' + auth)
|
||||
|
|
|
@ -14,6 +14,7 @@ authors = [{name = "Helmut Merz", email = "helmutm@cy55.de"}]
|
|||
dependencies = [
|
||||
"bs4",
|
||||
"BTrees",
|
||||
"docutils",
|
||||
"lxml",
|
||||
"persistent",
|
||||
"pillow",
|
||||
|
|
Loading…
Add table
Reference in a new issue