ajax

Django AJAX can't find url

Django AJAX can't find url Question: I’m using AJAX request to delete comment from product page, but django can’t find url (I’m getting this log ). Box url: path(‘box/<int:id>’, views.box, name=’box’) , delete url: path(‘delete-comment/<int:id>’, views.delete_comment, name=’delete_comment’),. My AJAX call: comment.addEventListener("click", () => { fetch(`delete-comment/${comment.dataset.comment_id}`, { method: "DELETE", headers: { "X-Requested-With": "XMLHttpRequest", } }) }); …

Total answers: 2

Field 'id' expected a number but got 'filter_data'. DJANGO, AJAX

Field 'id' expected a number but got 'filter_data'. DJANGO, AJAX Question: I am working on filters in my project. Based on the tutorial, I started adding Ajax so that I could filter cards by several categories. Everything was working fine until I added the data and jsonResponse. Now every time I click the checkbox I …

Total answers: 1

Remove HTML markup (getting the desired text)

Remove HTML markup (getting the desired text) Question: When parsing data from an AJAX table, the data is parsed with the type "bs4.element.Tag" (checked via "type"): enter image description here Although I specified the text attribute when requesting: enter image description here And I can’t get the text i need inside the HTML markup. As …

Total answers: 1

Django model not saving POST ajax request

Django model not saving POST ajax request Question: I’m fairly new to ajax and Django please excuse my spaghetti code. My Django model isn’t saving response even after getting a POST request. I’m trying to create a basic like , dislike counter and I’m having trouble updating my like value in database. Although I’m sending …

Total answers: 1

Scraping pre-market table on Barchart with Python

Scraping pre-market table on Barchart with Python Question: Apologies if this is a bit website specific (barchart.com). I used the guidance provided here for properly connecting and scraping barchart.com for Futures data. However, after hours of trying, I am at a loss as to how to pull off this same trick for their pre-market data …

Total answers: 1

Django + AJAX comments

Django + AJAX comments Question: I’m trying to implement a comment system without reloading the page, but it doesn’t work. Comments are inserted only after the page is reloaded, but AJAX does not work. <!– COMMENT –> <div class="comment-section"> <form action="{% url ‘love:comment_urls’ %}" method="POST" class=’comment-form’> {% csrf_token %} <input type="hidden" name="post_id" value={{i.pk}}> {{ comment_form …

Total answers: 1

'429 error: too many requests' when using Instagram API with Python script

'429 error: too many requests' when using Instagram API with Python script Question: I am trying to run a script that logs in to Instagram and uploads 10 images that have random text on them that have been generated. However, here is the output I am getting when I try to run the script: 2023-01-02 …

Total answers: 1

how do I make an ajax request to an asp net webform?

how do I make an ajax request to an asp net webform? Question: I am on a website and it has this when getting the data it uses a find button: <input type="submit" name="ctl00$MainContent$btnSearch" value="Find" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainContent$btnSearch&quot;, &quot;&quot;, true, &quot;chkNumbers&quot;, &quot;&quot;, false, false))" id="ctl00_MainContent_btnSearch" class="button"> is there anyway I can send a ajax request using …

Total answers: 1