projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4eb18f
)
context doesn't convert dict subclasses to dicts now
author
Armin Ronacher
<armin.ronacher@active-4.com>
Mon, 17 Sep 2007 13:33:45 +0000
(15:33 +0200)
committer
Armin Ronacher
<armin.ronacher@active-4.com>
Mon, 17 Sep 2007 13:33:45 +0000
(15:33 +0200)
--HG--
branch : trunk
jinja/datastructure.py
patch
|
blob
|
history
diff --git
a/jinja/datastructure.py
b/jinja/datastructure.py
index 8f2069d7f056c282fce6ff2352cd4e8dc052426f..f4887b3de72435635fe3b9e40c7a650a8bb4aa5e 100644
(file)
--- a/
jinja/datastructure.py
+++ b/
jinja/datastructure.py
@@
-245,9
+245,12
@@
class Context(BaseContext):
def __init__(self, *args, **kwargs):
environment = args[0]
+ if not kwargs and len(args) == 2 and isinstance(args[1], dict):
+ base = args[1]
+ else:
+ base = dict(*args[1:], **kwargs)
super(Context, self).__init__(environment.undefined_singleton,
- environment.globals,
- dict(*args[1:], **kwargs))
+ environment.globals, base)
self._translate_func = None
self.cache = {}
self.environment = environment