Selaa lähdekoodia

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

Thanks to Emil Gilliam
Ask Solem 14 vuotta sitten
vanhempi
commit
639f80239f
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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",