Browse Source

Mention relative imports in Django first steps guidee. Closes #914

Ask Solem 12 years ago
parent
commit
24730ac2fa
1 changed files with 9 additions and 0 deletions
  1. 9 0
      docs/django/first-steps-with-django.rst

+ 9 - 0
docs/django/first-steps-with-django.rst

@@ -92,6 +92,15 @@ Our example task is pretty pointless, it just returns the sum of two
 arguments, but it will do for demonstration, and it is referred to in many
 arguments, but it will do for demonstration, and it is referred to in many
 parts of the Celery documentation.
 parts of the Celery documentation.
 
 
+.. admonition:: Relative Imports
+
+    You have to consistent in how you import the task module, e.g. if
+    you have ``project.app`` in ``INSTALLED_APPS`` then you also
+    need to import the tasks ``from project.app`` or else the names
+    of the tasks will be different.
+
+    See :ref:`task-naming-relative-imports`
+
 Starting the worker process
 Starting the worker process
 ===========================
 ===========================