[Checkins] SVN: zope.app.onlinehelp/trunk/ removed OnlineHelpTopicFactory, simple and SimpleViewClass. All of them where
Roger Ineichen
roger at projekt01.ch
Tue Nov 4 05:58:15 EST 2008
Log message for revision 92770:
removed OnlineHelpTopicFactory, simple and SimpleViewClass. All of them where
using old deprecated and removed Zope3 imports. None of them where used and
tested.
Changed:
U zope.app.onlinehelp/trunk/CHANGES.txt
U zope.app.onlinehelp/trunk/setup.py
U zope.app.onlinehelp/trunk/src/zope/app/onlinehelp/onlinehelptopic.py
-=-
Modified: zope.app.onlinehelp/trunk/CHANGES.txt
===================================================================
--- zope.app.onlinehelp/trunk/CHANGES.txt 2008-11-04 05:53:27 UTC (rev 92769)
+++ zope.app.onlinehelp/trunk/CHANGES.txt 2008-11-04 10:58:12 UTC (rev 92770)
@@ -2,12 +2,21 @@
CHANGES
=======
-3.4.1 (2007-10-25)
-------------------
+Version 3.5.0dev (unreleased)
+-----------------------------
+- removed OnlineHelpTopicFactory, simple and SimpleViewClass. All of them where
+ using old deprecated and removed Zope3 imports. None of them where used and
+ tested.
+
+
+Version 3.4.1 (2007-10-25)
+--------------------------
+
- Package meta-data update.
-3.4.0 (2007-10-23)
-------------------
+Version 3.4.0 (2007-10-23)
+--------------------------
+
- Initial release independent of the main Zope tree.
Modified: zope.app.onlinehelp/trunk/setup.py
===================================================================
--- zope.app.onlinehelp/trunk/setup.py 2008-11-04 05:53:27 UTC (rev 92769)
+++ zope.app.onlinehelp/trunk/setup.py 2008-11-04 10:58:12 UTC (rev 92770)
@@ -22,7 +22,7 @@
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
setup(name = 'zope.app.onlinehelp',
- version = '3.5.0',
+ version = '3.5.0dev',
author='Zope Corporation and Contributors',
author_email='zope3-dev at zope.org',
description='Framework for Context-Sensitive Help Pages',
Modified: zope.app.onlinehelp/trunk/src/zope/app/onlinehelp/onlinehelptopic.py
===================================================================
--- zope.app.onlinehelp/trunk/src/zope/app/onlinehelp/onlinehelptopic.py 2008-11-04 05:53:27 UTC (rev 92769)
+++ zope.app.onlinehelp/trunk/src/zope/app/onlinehelp/onlinehelptopic.py 2008-11-04 10:58:12 UTC (rev 92770)
@@ -22,7 +22,6 @@
from persistent import Persistent
from zope.interface import implements
-from zope.component import getGlobalService, servicenames
from zope.configuration.exceptions import ConfigurationError
from zope.contenttype import guess_content_type
@@ -438,73 +437,3 @@
"""
implements(IZPTOnlineHelpTopic)
-
-
-def OnlineHelpTopicFactory(name, schema, label, permission, layer,
- template, default_template, bases, for_, fields,
- fulledit_path=None, fulledit_label=None, menu=u''):
- class_ = SimpleViewClass(template, used_for=schema, bases=bases)
- class_.schema = schema
- class_.label = label
- class_.fieldNames = fields
-
- class_.fulledit_path = fulledit_path
- if fulledit_path and (fulledit_label is None):
- fulledit_label = "Full edit"
-
- class_.fulledit_label = fulledit_label
-
- class_.generated_form = ViewPageTemplateFile(default_template)
-
- defineChecker(class_,
- NamesChecker(("__call__", "__getitem__",
- "browserDefault", "publishTraverse"),
- permission))
- if layer is None:
- layer = IDefaultBrowserLayer
-
- s = getGlobalService(servicenames.Adapters)
- s.register((for_, layer), Interface, name, class_)
-
-
-
-import sys
-from zope.interface import implements
-from zope.publisher.browser import BrowserView
-from zope.publisher.interfaces.browser import IBrowserPublisher
-from zope.publisher.interfaces import NotFound
-from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-
-class simple(BrowserView):
-
- implements(IBrowserPublisher)
-
- def browserDefault(self, request):
- return self, ()
-
- def publishTraverse(self, request, name):
- if name == 'index.html':
- return self.index
-
- raise NotFound(self, name, request)
-
- # TODO: we need some unittests for this !!!
- def __getitem__(self, name):
- return self.index.macros[name]
-
- def __call__(self, *args, **kw):
- return self.index(*args, **kw)
-
-def SimpleViewClass(src, offering=None, used_for=None, bases=()):
- if offering is None:
- offering = sys._getframe(1).f_globals
-
- bases += (simple, )
-
- class_ = type("SimpleViewClass from %s" % src, bases,
- {'index': ViewPageTemplateFile(src, offering)})
-
- if used_for is not None:
- class_.__used_for__ = used_for
-
- return class_
More information about the Checkins
mailing list