How can I send localstorage data from JavaScript ajax call and print return data from views in Django template

Couple likely reasons

  • the AJAX is set up to expect JSON, not HTML.
  • From what you have posted, it appears you’re returning a full html page and not just the fragment needed to update the DOM