title: Why am I getting name 'shared_task' is not defined error with Celery
body: <p>I am learning celery by following this <a href="https://codeburst.io/making-a-web-scraping-application-with-python-celery-and-django-23162397c0b6" rel="nofollow noreferrer">tutorial</a>.</p>
  <p>I created the tasks as he did and tried running the code. But I get the following error</p>
  <pre><code>NameError: name 'shared_task' is not defined
  </code></pre>
  <p>This is my code</p>
  <pre><code>import requests
  from bs4 import BeautifulSoup
  import json
  from datetime import datetime
  import lxml
  
  @shared_task
  def scrape():
      try:
          ...
  </code></pre>
  <p>This code is working for him but I get the above mentioned error. Not sure what I am doing wrong. Please help me</p>
  <p>Thanks in advance</p>