Global context from Django to frontend Django:

import json 
from django.conf import settings 

def backend_context(request): 
   return { 
    'backend_context': json.dumps({ }) 
   }

You can add backend_context to your contextprocessors in settings.py (for append it in every request context) or simply add to response rendering arguments.