Skip to content
This repository has been archived by the owner on Feb 12, 2020. It is now read-only.

Commit

Permalink
Avoid a deprecation warning for Globals.InitializeClass. Reformat cha…
Browse files Browse the repository at this point in the history
…ngelog!
  • Loading branch information
hannosch committed Mar 20, 2009
1 parent 2fd59e0 commit 4cb432f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
26 changes: 16 additions & 10 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
Changelog
=========

cmf.pt 0.3 (released 2/13/2009)
0.4 - unreleased
----------------

- Added ``_exec`` method to the file-system based skin template
class, largely carried over from
``Products.PageTemplates``. [malthe]
- Avoid a deprecation warning for Globals.InitializeClass. [hannosch]

cmf.pt 0.2 (released 12/17/2008)
0.3 - 2009-02-13
----------------

- The ``func_code`` attribute of file-system page templates should
simulate a function taking no arguments.

cmf.pt 0.1 (released 11/29/2008)
- Added ``_exec`` method to the file-system based skin template class, largely
carried over from `Products.PageTemplates`. [malthe]

- Initial release.
0.2 - 2008-12-17
----------------

- The ``func_code`` attribute of file-system page templates should simulate a
function taking no arguments. [malthe]

0.1 - 2008-11-29
----------------

- Initial release. [malthe]
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

version = '0.3'
version = '0.4'

setup(name='cmf.pt',
version=version,
Expand All @@ -11,7 +11,6 @@
"Programming Language :: Python",
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Text Processing :: Markup :: XML",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords='',
author='Malthe Borch and the Zope community',
Expand Down
10 changes: 7 additions & 3 deletions src/cmf/pt/fs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Globals
# BBB for Zope 2.10
try:
from App.class_init import InitializeClass
except ImportError:
from Globals import InitializeClass

from Products.CMFCore.FSObject import FSObject
from Products.CMFCore import DirectoryView
Expand Down Expand Up @@ -81,8 +85,8 @@ def _readMetadata(self):
def __call__(self, *args, **kwargs):
return self._call(FSPageTemplate.__call__, *args, **kwargs)

Globals.InitializeClass(FSPageTemplate)
Globals.InitializeClass(FSControllerPageTemplate)
InitializeClass(FSPageTemplate)
InitializeClass(FSControllerPageTemplate)

DirectoryView.registerFileExtension('pt', FSPageTemplate)
DirectoryView.registerFileExtension('zpt', FSPageTemplate)
Expand Down

0 comments on commit 4cb432f

Please sign in to comment.