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
Tag: django
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
Getting fullcalendar javascript click data to django modelform
i want to click event on Fullcalendar, then it open another page, like this . but how to get data from fullcalendar ? there are function dateStr for show date, and resource.id, to show resource in timeline view(fullcalendar) . what i want is bring dateStr and resource.id clicked data to django modelform, here views.py im not sure what should i
Multiple ChartJS scripts are not working at the same time
When I am using a Single Chart in ChartJS, it works well but whenever I use more than a Chart, only the last chart works, the others don’t longer display. I am not sure of what the problem might actually be as I have checked the console and terminal if I would get any error or so so as to
Vue.js component specific delimiters with Django and Vue-loader
I am creating a Django + Vue.js v3 app, and found it very useful to use vue3-sfc-loader, as I can use Django to render .vue files easily, and get the best of both worlds. This setup works and Django successfully renders the .vue file, which are then picked up by vue3-sfc-loader, but the issue is that I cannot change the
Are you required to make an http request when trying to use Chart.js?
I followed a tutorial video that showed how to set up Chart.js with Django, using Jquery and API function calls to a page on my site. However, I don’t need to make these function calls to get the data, as the data are associated with my objects themselves. When I get rid of the http function call and just write
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