Skip to content

Commit

Permalink
Removing template_opts parameter from template plugin (deprecated sin…
Browse files Browse the repository at this point in the history
…ce 0.9)
  • Loading branch information
defnull committed Mar 22, 2013
1 parent 900412f commit 2d20c98
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion test/test_wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 2d20c98

Please sign in to comment.