summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Gilmore <brandon@mg2.org>2010-10-07 14:32:10 -0700
committerMarcel Hellkamp <marc@gsites.de>2010-10-09 22:37:01 +0200
commit0ed3acdfb3fd94065d8b3218917a917a99a0914b (patch)
treecfc081364386974f3af6995bf1c81826b1b92f39
parentedd05f29d868825bb2de6d1bc1a8aadc9a2df6c7 (diff)
downloadbottle-0ed3acdfb3fd94065d8b3218917a917a99a0914b.tar.gz
made DictMixins usable with the @view decorator
-rwxr-xr-xbottle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bottle.py b/bottle.py
index e0bd05a..fd3dc62 100755
--- a/bottle.py
+++ b/bottle.py
@@ -1806,7 +1806,7 @@ def view(tpl_name, **defaults):
@functools.wraps(func)
def wrapper(*args, **kwargs):
result = func(*args, **kwargs)
- if isinstance(result, dict):
+ if isinstance(result, (dict, DictMixin)):
tplvars = defaults.copy()
tplvars.update(result)
return template(tpl_name, **tplvars)