attach_documents_to_project.delay(
instance=current_project,
created=True,
request_data=request.data)
The above code is in my .view.py file where I am calling celery task.
@shared_task
def attach_documents_to_project(instance, created, **kwargs):
if created:
request_data = kwargs.get('request_data')
if created and request_data:
attachments_data = request_data.get('document')
This is my tasks.py file where I am using this req.data to manipulate further.