Explorar o código

first steps with celery: Make sure cwd is in sys.path

Ask Solem %!s(int64=15) %!d(string=hai) anos
pai
achega
91b614d332
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      docs/getting-started/first-steps-with-celery.rst

+ 4 - 0
docs/getting-started/first-steps-with-celery.rst

@@ -70,6 +70,10 @@ Let's create our ``celeryconfig.py``.
 
    We only have a single task module, ``tasks.py``, which we added earlier::
 
+        import os
+        import sys
+        sys.path.insert(0, os.getcwd())
+
         CELERY_IMPORTS = ("tasks", )
 
 That's it.