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
3974
August 16, 2021
Problem with ajax in Django
Using Django
7
3239
March 3, 2020
Having Problems With Ajax/Fetch Method
Using Django
2
628
May 11, 2021
How can I pass my values to javascript instead of the template
Templates & Frontend
8
3792
August 6, 2022
Passing A JavaScript Variable In An HTML File To A Django View Function
Templates & Frontend
87
20735
September 17, 2022