Distributed tracing not working in DJango/Python monolithic app

From the backend request we are extracting the trace id like this:

span = sentry_sdk.Hub.current.scope.span
{
‘SENTRY_TRACE_ID’: span.trace_id if span else None
}

and setting it in the template like this:

yet our backend (django/python) and js project are not connected through distributed tracing.