From 53278a3238ac74775527fa217deb9fe8b7ba69fe Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 24 Jan 2011 01:16:00 +0100 Subject: [PATCH] Damn you Sphinx --- jinja2/ext.py | 4 +++- jinja2/sandbox.py | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/jinja2/ext.py b/jinja2/ext.py index ceb3895..5ba6efd 100644 --- a/jinja2/ext.py +++ b/jinja2/ext.py @@ -103,7 +103,9 @@ class Extension(object): def attr(self, name, lineno=None): """Return an attribute node for the current extension. This is useful - to pass constants on extensions to generated template code:: + to pass constants on extensions to generated template code. + + :: self.attr('_my_attribute', lineno=lineno) """ diff --git a/jinja2/sandbox.py b/jinja2/sandbox.py index 3136f64..a1cbb29 100644 --- a/jinja2/sandbox.py +++ b/jinja2/sandbox.py @@ -98,8 +98,9 @@ def safe_range(*args): def unsafe(f): - """ - Mark a function or method as unsafe:: + """Marks a function or method as unsafe. + + :: @unsafe def delete(self): -- 2.26.2