app/django/template/context.py
changeset 323 ff1a9aa48cfd
parent 54 03e267d67478
--- a/app/django/template/context.py	Tue Oct 14 12:36:55 2008 +0000
+++ b/app/django/template/context.py	Tue Oct 14 16:00:59 2008 +0000
@@ -62,6 +62,8 @@
 
     def update(self, other_dict):
         "Like dict.update(). Pushes an entire dictionary's keys and values onto the context."
+        if not hasattr(other_dict, '__getitem__'): 
+            raise TypeError('other_dict must be a mapping (dictionary-like) object.')
         self.dicts = [other_dict] + self.dicts
         return other_dict