From a37220b84dee4cc8b1b12f34643ce97dad89ffe1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 14 Sep 2009 08:15:01 +0000 Subject: - The ``view`` attribute of the ``view`` ZCML directive is no longer required if the ZCML directive has a ``template`` attribute. --- repoze/bfg/zcml.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'repoze/bfg/zcml.py') diff --git a/repoze/bfg/zcml.py b/repoze/bfg/zcml.py index bca28d47e..ff2549447 100644 --- a/repoze/bfg/zcml.py +++ b/repoze/bfg/zcml.py @@ -89,7 +89,12 @@ def view( ): if not view: - raise ConfigurationError('"view" attribute was not specified') + if template: + def view(context, request): + return {} + else: + raise ConfigurationError('"view" attribute was not specified and ' + 'no template specified') sm = getSiteManager() -- cgit v1.2.3