django-background-task
django-background-task copied to clipboard
Object of type 'WSGIRequest' is not JSON serializable
my code:
@background(schedule=60)
def g_trends(request):
get_trends()
return HttpResponse('hello')
when i run code in django and i get to my url for that function i get this error: Object of type 'WSGIRequest' is not JSON serializable how can i fix it?
do not send request as task argument. that object type does not JSON serializable, it can not be stored in database as argument