From 2cce431f02a37c119eacfc3dfa94af9fe3305de1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 18 Oct 2009 02:27:43 +0000 Subject: - More than one ``@bfg_view`` decorator may now be stacked on top of any number of others. Each invocation of the decorator registers a single view. For instance, the following combination of decorators and a function will register two views:: from repoze.bfg.view import bfg_view @bfg_view(name='edit') @bfg_view(name='change') def edit(context, request): pass This makes it possible to associate more than one view configuration for a single callable without requiring ZCML. --- repoze/bfg/tests/test_zcml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'repoze/bfg/tests/test_zcml.py') diff --git a/repoze/bfg/tests/test_zcml.py b/repoze/bfg/tests/test_zcml.py index 77137ceba..7538072ca 100644 --- a/repoze/bfg/tests/test_zcml.py +++ b/repoze/bfg/tests/test_zcml.py @@ -2390,7 +2390,7 @@ class TestBFGViewGrokker(unittest.TestCase): containment=None, attr=None, renderer=None, wrapper_viewname=None, xhr=False, header=None, accept=None) - obj.__bfg_view_settings__ = settings + obj.__bfg_view_settings__ = [settings] context = DummyContext() result = grokker.grok('name', obj, context=context) self.assertEqual(result, True) -- cgit v1.2.3