浏览代码

Fixes typo

Ask Solem 11 年之前
父节点
当前提交
0fbab3ab3f
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      docs/userguide/tasks.rst

+ 2 - 3
docs/userguide/tasks.rst

@@ -997,12 +997,11 @@ will do roughly this behind the scenes:
 
 .. code-block:: python
 
-    @app.task
-    class AddTask(Task):
+    class _AddTask(app.Task):
 
         def run(self, x, y):
             return x + y
-    add = registry.tasks[AddTask.name]
+    add = app.tasks[_AddTask.name]
 
 
 Instantiation