Django Forum
How can I send localstorage data from JavaScript ajax call and print return data from views in Django template
Using Django
KenWhitesell
January 29, 2022, 5:19pm
42
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
← previous page
Related Topics
Topic
Replies
Views
Activity
Send data with POST-request wont work in Django with AJAX
Using Django
1
3061
August 16, 2021
Ajax POST, from html to views
Forms & APIs
1
307
March 10, 2023
Pass data to javascript from views.py
Templates & Frontend
3
1742
December 14, 2022
Using window.localstorage to store a CSS animation
Using Django
1
1165
October 18, 2020
How to update the dictionary in django templates using Ajax?
Using Django
6
3201
August 4, 2020