backport changes from bbmaster2: avoid creation of new controller via view/@@controller

This commit is contained in:
Helmut Merz 2016-02-05 12:37:52 +01:00
parent 3721e5caf7
commit 861f340b81
2 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
<metal:block define-macro="page"
tal:define="controller nocall:view/@@controller;
tal:define="controller nocall:view/controller;
dummy view/setupSubviews"
tal:condition="view/update"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"

View file

@ -87,8 +87,8 @@ class GenericView(object):
cont = viewAnnotations.get('controller', None)
if cont is None:
cont = component.queryMultiAdapter((self, self.request), name='controller')
if cont is not None:
self.setController(cont)
#if cont is not None:
# self.setController(cont)
return cont
controller = property(getController, setController)