javascript

How to integrate vuejs in a django project?

How to integrate vuejs in a django project? Question: we need to create a complete website with django and vue as part of a school project, however, we are having trouble integrating vue into our django project. To keep things simple we want to use vue directly in an index.html file located in a django …

Total answers: 1

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

Django – Can't fetch Json data in javascript

Django – Can't fetch Json data in javascript Question: Hello I am pretty new to Django and Javascript I want to build a simple application where users can write posts and see a list of all posts in reverse chronologial order on the index page. (The index page is rendered fine.) I created some Posts …

Total answers: 1

How to scrape data from an interactive chart using python?

How to scrape data from an interactive chart using python? Question: I would like to scrape the date and total value data from the "Value History" chart on the following link when the chart is set to 1Y: https://csgoskins.gg/markets/csgofloat I’ve tried to look and see if the data on the site is stored in a …

Total answers: 1

I want to decrypt an Image but I don't know how I should read the file

I want to decrypt an Image but I don't know how I should read the file Question: I have an image "1.jpg.enc", I know how to decrypt it in Javascript but when I try to do it on Python I keep getting error of "io". here’s my Javascript code function _decryptImage( encrypted, key ) { …

Total answers: 1

Execute javascript code in nodejs using spawn

Execute javascript code in nodejs using spawn Question: I wrote below code in node js to execute python code and print logs and return output using spawn, const { spawn } = require(‘node:child_process’); const ls = spawn(‘node’, [‘-c’, "python code content will come here"]); ls.stdout.on(‘data’, (data) => { console.log(`stdout: ${data}`); }); it works fine, but …

Total answers: 1

Flask app is running correct function, but not rendering template

Flask app is running correct function, but not rendering template Question: I have a flask app with a template. I am attempting to send via post several items collected by javascript when the user clicks a button. When I post my data to /confirm, the print statement executes, but the render_template function does not render …

Total answers: 1

how to stop the countdown loop

how to stop the countdown loop Question: I am trying to create a countdown, how when it goes to 0 it will stop the loop and show a message import time countdown = 100 while True: display = " [ Countdown {:03d} ] ".format(countdown) print(display, end="r") time.sleep(2) countdown -= 1 Asked By: MThien || Source …

Total answers: 3