diff options
author | Marcel Hellkamp <marc@gsites.de> | 2013-03-22 16:33:30 +0100 |
---|---|---|
committer | Marcel Hellkamp <marc@gsites.de> | 2013-03-22 16:36:18 +0100 |
commit | 2d20c98511c1d080622fbd2858ae1173f665c4c5 (patch) | |
tree | b7578deb621512678e91ecd8a3d40b1c3e96716a | |
parent | 900412f5e37c128dcb57095cbbcf96a745f395af (diff) | |
download | bottle-2d20c98511c1d080622fbd2858ae1173f665c4c5.tar.gz |
Removing template_opts parameter from template plugin (deprecated since 0.9)
-rw-r--r-- | bottle.py | 3 | ||||
-rwxr-xr-x | test/test_wsgi.py | 2 |
2 files changed, 1 insertions, 4 deletions
@@ -1691,9 +1691,6 @@ class TemplatePlugin(object): 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 b28e13d..4b9a944 100755 --- a/test/test_wsgi.py +++ b/test/test_wsgi.py @@ -250,7 +250,7 @@ class TestRouteDecorator(ServerTestBase): 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') |