Changeset 6854
- Timestamp:
- 12/02/07 17:57:22 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/template/context.py
r6671 r6854 24 24 25 25 def push(self): 26 self.dicts = [{}] + self.dicts 26 d = {} 27 self.dicts = [d] + self.dicts 28 return d 27 29 28 30 def pop(self): 29 31 if len(self.dicts) == 1: 30 32 raise ContextPopException 31 del self.dicts[0]33 return self.dicts.pop(0) 32 34 33 35 def __setitem__(self, key, value): … … 63 65 "Like dict.update(). Pushes an entire dictionary's keys and values onto the context." 64 66 self.dicts = [other_dict] + self.dicts 67 return other_dict 65 68 66 69 # This is a function rather than module-level procedural code because we only django/trunk/tests/regressiontests/templates/tests.py
r6729 r6854 19 19 20 20 from unicode import unicode_tests 21 from context import context_tests 21 22 import filters 22 23 … … 24 25 __test__ = { 25 26 'unicode': unicode_tests, 27 'context': context_tests, 26 28 } 27 29
