From 2d20c98511c1d080622fbd2858ae1173f665c4c5 Mon Sep 17 00:00:00 2001 From: Marcel Hellkamp Date: Fri, 22 Mar 2013 16:33:30 +0100 Subject: [PATCH] Removing template_opts parameter from template plugin (deprecated since 0.9) --- bottle.py | 3 --- test/test_wsgi.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/bottle.py b/bottle.py index 04c08f44c..6ad4b2073 100644 --- a/bottle.py +++ b/bottle.py @@ -1691,9 +1691,6 @@ def apply(self, callback, route): conf = route.config.get('template') if isinstance(conf, (tuple, list)) and len(conf) == 2: return view(conf[0], **conf[1])(callback) - elif isinstance(conf, str) and 'template_opts' in route.config: - depr('The `template_opts` parameter is deprecated.') #0.9 - return view(conf, **route.config['template_opts'])(callback) elif isinstance(conf, str): return view(conf)(callback) else: diff --git a/test/test_wsgi.py b/test/test_wsgi.py index b28e13d84..4b9a944b5 100755 --- a/test/test_wsgi.py +++ b/test/test_wsgi.py @@ -250,7 +250,7 @@ def test(): return dict(a=5, b=6) self.assertBody('test 5 6', '/test') def test_template_opts(self): - @bottle.route(template='test {{a}} {{b}}', template_opts={'b': 6}) + @bottle.route(template=('test {{a}} {{b}}', {'b': 6})) def test(): return dict(a=5) self.assertBody('test 5 6', '/test')