Skip to content
Advertisement

Tag: django

Why does javascript create spurious images using ajax?

Firstly I must apologise for the length of the code in this question. It is based on Django and javascript and I have stripped out as much as I can to give a working example The challenge is to create a composite image using a random number of rooks – all black rooks on the top row and all red

How to store in a JavaScript variable the selected rows in a table

Let’s say we have a table like this: And let’s say that gene_variant_results has for example, 4 results. Each result corresponds to a row (each row has about 100 columns, in this example I only put 11 for illustrative purposes): For example, if I click on the first two checkboxes and then click on the #show-selected button, I would like

Django | JS variable inside dynamic URL

I’m trying to pass a javascript variable inside a dynamic url using Django. I have the following path I’m able to retrieve the “Task” fields I created (id, title, description, …) depending on what task I select inside the HTML (this is done using AJAX and the Django-REST Framework). However, I’m having some trouble on rendering javascript values inside dynamic

Separating Django REST back from Front end

This is a bit of a different question. I’ve tried researching the information for a few hours now and I can’t seem to find what I am looking for. I have a Django REST backend that I set up. Its very simple REST API that has one Model Model.py I’m able to post to via the REST api interface see

Ajax post requests 403 error only for some users?

I’ve been testing my site by having friends try it, and some friends get the 403 Forbidden error on any function using ajax. I’m confused why only some of them get the error, especially when everyone used the same browser. Does anyone know why? I’m using Django as a framework and I think I’ve done everything in the documentation here

Django – AJAX Fetch sends request for each input letter

This might be far from how it should be done, I’m learning on the go and it’s my first time trying something like this. Problem: Even with the setTimeout function, server sends response for each letter I have written, though I would expect it to wait for user to stop typing and just fetch the finished word(s) Script in my

Advertisement