Prechádzať zdrojové kódy

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

Ask Solem 15 rokov pred
rodič
commit
91b614d332

+ 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.