Commit fe24a0e5 authored by Hanno Schlichting's avatar Hanno Schlichting

Merged c129542 from 2.13 branch

parent a1a2082f
...@@ -208,6 +208,8 @@ class view(zope.browserpage.metaconfigure.view): ...@@ -208,6 +208,8 @@ class view(zope.browserpage.metaconfigure.view):
(_context, name, (for_, layer), permission, class_, (_context, name, (for_, layer), permission, class_,
allowed_interface, allowed_attributes) = self.args allowed_interface, allowed_attributes) = self.args
name = str(name) # De-unicode
required = {} required = {}
cdict = {} cdict = {}
......
...@@ -87,15 +87,15 @@ sure it is now: ...@@ -87,15 +87,15 @@ sure it is now:
<Products.Five.browser.metaconfigure.NewStyleClass ...> <Products.Five.browser.metaconfigure.NewStyleClass ...>
Both browser:view and browser:page are ILocation providers, so make sure they Both browser:view and browser:page are ILocation providers, so make sure they
have a __name__ attribute: have a __name__ attribute with a str instance:
>>> page = self.folder.unrestrictedTraverse('testoid/eagle.txt') >>> page = self.folder.unrestrictedTraverse('testoid/eagle.txt')
>>> page.__name__ >>> page.__name__
u'eagle.txt' 'eagle.txt'
>>> view = self.folder.unrestrictedTraverse('testoid/named_view') >>> view = self.folder.unrestrictedTraverse('testoid/named_view')
>>> view.__name__ >>> view.__name__
u'named_view' 'named_view'
ZPT-based browser pages ZPT-based browser pages
----------------------- -----------------------
......
...@@ -49,7 +49,7 @@ def test_menu(): ...@@ -49,7 +49,7 @@ def test_menu():
>>> menu.sort(lambda x, y: cmp(x['title'], y['title'])) >>> menu.sort(lambda x, y: cmp(x['title'], y['title']))
>>> from pprint import pprint >>> from pprint import pprint
>>> pprint(menu[0]) >>> pprint(menu[0])
{'action': u'@@cockatiel_menu_public.html', {'action': '@@cockatiel_menu_public.html',
'description': u'', 'description': u'',
'extra': None, 'extra': None,
'icon': None, 'icon': None,
...@@ -100,7 +100,7 @@ def test_menu(): ...@@ -100,7 +100,7 @@ def test_menu():
>>> menu.sort(lambda x, y: cmp(x['title'], y['title'])) >>> menu.sort(lambda x, y: cmp(x['title'], y['title']))
>>> pprint(menu[0]) >>> pprint(menu[0])
{'action': u'@@cockatiel_menu_protected.html', {'action': '@@cockatiel_menu_protected.html',
'description': u'', 'description': u'',
'extra': None, 'extra': None,
'icon': None, 'icon': None,
...@@ -109,7 +109,7 @@ def test_menu(): ...@@ -109,7 +109,7 @@ def test_menu():
'title': u'Page in a menu (protected)'} 'title': u'Page in a menu (protected)'}
>>> pprint(menu[1]) >>> pprint(menu[1])
{'action': u'@@cockatiel_menu_public.html', {'action': '@@cockatiel_menu_public.html',
'description': u'', 'description': u'',
'extra': None, 'extra': None,
'icon': None, 'icon': None,
......
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