Commit f380c5b8 authored by Wichert Akkerman's avatar Wichert Akkerman

Use str __name__ for generated simple view classes.

This fixes LP #1129030
parent 656f6278
...@@ -8,6 +8,9 @@ http://docs.zope.org/zope2/releases/. ...@@ -8,6 +8,9 @@ http://docs.zope.org/zope2/releases/.
2.13.20 (unreleased) 2.13.20 (unreleased)
-------------------- --------------------
- Make sure the generated classes for simple browser pages (SimpleViewClasses)
have a str __name__. See LP #1129030.
- In PageTemplate.pt_errors accept the check_macro_expansion argument. - In PageTemplate.pt_errors accept the check_macro_expansion argument.
This is added for compatibility with zope.pagetemplate 4.0.0. The This is added for compatibility with zope.pagetemplate 4.0.0. The
argument is ignored. See LP #732972. argument is ignored. See LP #732972.
......
...@@ -59,6 +59,7 @@ def page(_context, name, permission, for_, ...@@ -59,6 +59,7 @@ def page(_context, name, permission, for_,
attribute='__call__', menu=None, title=None, attribute='__call__', menu=None, title=None,
): ):
name = str(name) # De-unicode
_handle_menu(_context, menu, title, [for_], name, permission) _handle_menu(_context, menu, title, [for_], name, permission)
if not (class_ or template): if not (class_ or template):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment