
from tasks import add
from django.http import HttpResponse


def foo(request):
    r = add.delay(2, 2)
    return HttpResponse(r.task_id)


from demoapp import tasks
from django.http import HttpResponse


def foo(request):
    r = tasks.add.delay(2, 2)
    return HttpResponse(r.task_id)

Use from demoapp import tasks instead
Use from demoapp import tasks instead

  
- from tasks import add
+ from demoapp import tasks
  from django.http import HttpResponse
  
  
  def foo(request):
-     r = add.delay(2, 2)
+     r = tasks.add.delay(2, 2)
      return HttpResponse(r.task_id)
  
Use from demoapp import tasks instead
## Code Before:

from tasks import add
from django.http import HttpResponse


def foo(request):
    r = add.delay(2, 2)
    return HttpResponse(r.task_id)

## Instruction:
Use from demoapp import tasks instead
## Code After:

from demoapp import tasks
from django.http import HttpResponse


def foo(request):
    r = tasks.add.delay(2, 2)
    return HttpResponse(r.task_id)
