I’m not quite sure what you mean? If you’re using the Django templating engine, then you probably don’t need the REST API. You can just pass the values straight to the template on the backend.
fetch() API. Or, use a library like axios or jQuery’s AJAX requests.