inheritance uses a less awkward hack for contexts now and subclassing templates is possible
--HG--
branch : trunk
diff --git a/jinja2/utils.py b/jinja2/utils.py
index 6e9dbc0..639cda6 100644
--- a/jinja2/utils.py
+++ b/jinja2/utils.py
@@ -33,6 +33,14 @@
return f
+def environmentfunction(f):
+ """Mark a callable as environment callable. An environment callable is
+ passed the current environment as first argument.
+ """
+ f.environmentfunction = True
+ return f
+
+
def import_string(import_name, silent=False):
"""Imports an object based on a string. This use useful if you want to
use import paths as endpoints or something similar. An import path can