summaryrefslogtreecommitdiff
path: root/doc/development/tutorials/examples/todo.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development/tutorials/examples/todo.py')
-rw-r--r--doc/development/tutorials/examples/todo.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/development/tutorials/examples/todo.py b/doc/development/tutorials/examples/todo.py
index 6ba39944f..7eee534d0 100644
--- a/doc/development/tutorials/examples/todo.py
+++ b/doc/development/tutorials/examples/todo.py
@@ -70,6 +70,9 @@ def process_todo_nodes(app, doctree, fromdocname):
# Augment each todo with a backlink to the original location.
env = app.builder.env
+ if not hasattr(env, 'todo_all_todos'):
+ env.todo_all_todos = []
+
for node in doctree.traverse(todolist):
if not app.config.todo_include_todos:
node.replace_self([])