瀏覽代碼

Routing Userguide: Fixed typo in router example (missing self argument)

Thanks to Emil Gilliam
Ask Solem 14 年之前
父節點
當前提交
639f80239f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/userguide/routing.rst

+ 1 - 1
docs/userguide/routing.rst

@@ -476,7 +476,7 @@ All you need to define a new router is to create a class with a
 
     class MyRouter(object):
 
-        def route_for_task(task, args=None, kwargs=None):
+        def route_for_task(self, task, args=None, kwargs=None):
             if task == "myapp.tasks.compress_video":
                 return {"exchange": "video",
                         "exchange_type": "topic",