]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Cleanup and changelog entry for new contextfunction behavior
authorArmin Ronacher <armin.ronacher@active-4.com>
Sat, 18 May 2013 10:58:12 +0000 (11:58 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Sat, 18 May 2013 10:58:12 +0000 (11:58 +0100)
CHANGES
jinja2/runtime.py

diff --git a/CHANGES b/CHANGES
index 6539c5fd021dd742e8bd66df4fff2edafad83dfc..c2cd4a4366d3751067b253cda0b0c1e89d8a4401 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -15,6 +15,7 @@ Version 2.7
   want to change this encoding they can override the filter.
 - Accessing `last` on the loop context no longer causes the iterator
   to be consumed into a list.
+- Allow `contextfunction` and other decorators to be applied to `__call__`.
 
 Version 2.6
 -----------
index dd49426caab4b58561a644f6e300cd7b346ae81a..34259d801bc43e060d23e3eb8ec6d77bd829a3b3 100644 (file)
@@ -171,17 +171,17 @@ class Context(object):
         """
         if __debug__:
             __traceback_hide__ = True
-        
+
         # Allow callable classes to take a context
         if hasattr(__obj, '__call__'):
             fn = __obj.__call__
-            for fn_type in ('contextfunction', 
-                            'evalcontextfunction', 
+            for fn_type in ('contextfunction',
+                            'evalcontextfunction',
                             'environmentfunction'):
                 if hasattr(fn, fn_type):
                     __obj = fn
-                    break;
-        
+                    break
+
         if isinstance(__obj, _context_function_types):
             if getattr(__obj, 'contextfunction', 0):
                 args = (__self,) + args