Browse Source

Django: Fixed typo @celery.task -> @app.task

Ask Solem 11 năm trước cách đây
mục cha
commit
841925a401
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      docs/django/first-steps-with-django.rst

+ 1 - 1
docs/django/first-steps-with-django.rst

@@ -48,7 +48,7 @@ that defines the Celery instance:
     app.config_from_object('django.conf:settings')
     app.autodiscover_tasks(settings.INSTALLED_APPS, related_name='tasks')
 
-    @celery.task(bind=True)
+    @app.task(bind=True)
     def debug_task(self):
         print('Request: {0!r}'.format(self.request))