Explorar o código

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

Thanks to Emil Gilliam
Ask Solem %!s(int64=15) %!d(string=hai) anos
pai
achega
639f80239f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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",