Skip to content

Commit

Permalink
Removed dependency and support for zope.app.pagetemplate. ViewPageTem…
Browse files Browse the repository at this point in the history
…plateFiles in Zope2 need to be based on the Five version.
  • Loading branch information
hannosch committed May 18, 2012
1 parent 345ef91 commit 067f037
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CHANGES
1.0.4 (unreleased)
------------------

- Nothing changed yet.
- Removed dependency and support for zope.app.pagetemplate.


1.0.3 (2012-05-07)
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
'zope.testing',
'zope.traversing',
'zope.viewlet',
'zope.app.pagetemplate',
'transaction',
'Acquisition',
'Zope2',
Expand Down
4 changes: 1 addition & 3 deletions src/five/customerize/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
from Products.PageTemplates.PageTemplateFile import PageTemplateFile as Z2PTF
from zope.pagetemplate.pagetemplatefile import PageTemplateFile as Z3PTF
from Products.Five.browser.pagetemplatefile import BoundPageTemplate as Z2BPT
from zope.app.pagetemplate.viewpagetemplatefile import BoundPageTemplate as Z3BPT


def isTemplate(obj):
""" check if the given object is a or is derived from a template class """
# TODO: we should really check via interfaces, i.e. `providedBy` here,
# but the only class using interfaces atm is Z3PTF :(
return isinstance(obj, Z2PTF) or isinstance(obj, Z3PTF) or \
isinstance(obj, Z2BPT) or isinstance(obj, Z3BPT)
return isinstance(obj, (Z2PTF, Z3PTF, Z2BPT))


def findViewletTemplate(viewlet):
Expand Down

0 comments on commit 067f037

Please sign in to comment.