All Questions
377
questions
2
votes
1
answer
36
views
How to display average ratings in the form of stars in django
I want to display the average rating on a product in the form of stars where i want to have 5 stars and then fill the stars with gold color on how much the average rating on the product is.
This is my ...
0
votes
0
answers
54
views
button with copytoclipboard functionality on odoo 16
I'm looking for a way to get the functionality of copytoclipboard on a button on wizard in Odoo 16. This button should be copying the text from a 'TEXT' field on the same wizard, share your valuable ...
0
votes
0
answers
60
views
Issue with NFC Tag (NTAG213) Becoming Unwritable Without Storing Desired URL Data
I've been working on a project involving NTAG213 NFC tags. My objective is to write a specific URL to these NFC tags and then lock them to prevent any further modification or overwriting. However, I'm ...
0
votes
2
answers
101
views
Updating html for specific model instance Django
I have a Django template that generates a HTML 'card-like' element for each model instance. Each instance (ie 'post') have a button, when on click, I would like to update a value within that SAME ...
-1
votes
2
answers
237
views
How to open a URL in a new tab on the client machine when a button is clicked
hope you are well, I am working on a project where I have a button to click in that text is there, so when I click that button, the URL should open in a new tab in the client machine but it is opening ...
3
votes
1
answer
572
views
Equivalent pandas dataframe in javascript
Do you know what is the equivalent for javascript ? This is my code :
def sort_df(datas):
df_not_sorted = pd.read_json(StringIO(datas))
df_not_sorted["Date"] = df_not_sorted["Date&...
0
votes
0
answers
470
views
How can I listen to the onFieldChange event in Odoo 16 using JavaScript?
I would like to listen for the onChange event of a field in Odoo 16 using JavaScript. I have attempted the following code snippets, but they did not yield the desired results.
my_module/static/src/js/...
2
votes
1
answer
95
views
Django: How to prevent a page from reloading when I click button with Ajax/Javascript? (not jQuery)
Premise: A question that can be useful to many. Fetch instead of Ajax. Today Ajax is often replaced by the newer Fetch in Javascript, which provides a better alternative. If you're looking for a way ...
0
votes
1
answer
73
views
JS WebSocket failed to connect to python socket, [the server says it's connected]
I am facing a problem with establishing WebSocket connection,
Here is my code:
let sock = new WebSocket('ws://127.0.0.1:8080/');
sock.addEventListener('error', (event)=>{
console.log(event);
})
...
0
votes
1
answer
131
views
How to parse boolean with PyScript from HTML to Python
From a PyScript app, I am providing two radio buttons in my index.html,
allowing a user to decide wether synthesis of isotropic gaussian blobs should be overlapping or not (effectively by toggling the ...
0
votes
0
answers
51
views
Python CustomJS filtering "Contains" instead of "Equals"
I'm creating a plot in Bokeh with a MultiChoice Widget to filter my data. I'm using this CustomJS statement to filter my data:
enter var s1 = source.data;
var selected = multi_choice.value;
var ...
1
vote
0
answers
47
views
Looping through a list to generate pixel heights taking long time
I am trying to loop though a list of urls and trying to extract their pixel lengths.
For a limited set of urls this loop works great. But fr a higher number of urls ( 50k urls in the list ) This loop ...
2
votes
1
answer
433
views
What is the reason a Python3 loop is taking so much longer than Node.js?
First of all, some readers are negating it as a valid question. But if my goal is to check, if I have an algorithm that is O(n²) and n is 10,000 or 100,000, then what kind of minimum running time ...
0
votes
1
answer
463
views
How to pass file using html form, Dropzone and Flask
I am using Dropzone and Flask using html form to pass files. like this below:
<form
action="/"
enctype="multipart/form-data"
method="POST"
class="...
0
votes
0
answers
208
views
Flask and Stripe Payment: 400 Bad Request from API call
I am trying to send a JSON file from my Frontend to Flask where the JSON file is the line_items for the Stripe checkout session. However, I keep getting the following error:
400 Bad Request: Did not ...