All Questions
Tagged with javascript django
11,380 questions
0
votes
1
answer
35
views
JavaScript Django default scaling using extends index
I'm using Django's template inheritance (extends) in every page of the app. The current design looks too zoomed out, and I want to adjust the default scaling through my index.html, but it didn't work. ...
1
vote
1
answer
44
views
getCSRFToken is not defined error, JavaScript
This is the part of the code in the Django + JavaScript Todo App that is responsible for deleting a note. I need a csrftoken for this, but the JS is showing me an error in the console. What did I do ...
0
votes
1
answer
45
views
How to intercept a form submit in websocket connection?
I have "inherited" a piece of code from a chat application. I would like to add some custom checks on the user input upon submission, allowing the submit to be aborted on client side if ...
-3
votes
1
answer
61
views
How to remove hardcoded library version info from minified JS files in Django production? [closed]
'm using Django to serve static files in production, and I've noticed that many of the third-party JS libraries (like jQuery, Bootstrap, JSZip, and Moment.js) include hardcoded version numbers inside ...
2
votes
0
answers
74
views
Integrating New Google Maps Autocomplete API into Django Project
I'm using the new Google PlaceAutocompleteElement() API function (not the legacy google.maps.places.Autocomplete) and would like help integrating it into my Django project.
Specifically, I want to add ...
1
vote
2
answers
99
views
Wagtail - How can I use a custom StructBlock with programmatically assignable default values?
I have created a StreamField for some of the site's settings. This StreamField contains a collection of a custom StructBlock, named FacetBlock. FacetBlock contains a BooleanBlock, a CharBlock, an ...
-1
votes
1
answer
46
views
CS50W Project network, can't figure how to implement the Paginator
I've been trying to implement the paginator function for about two months now. I've tried many different approaches, but they always lead to new bugs.
In views.py, I load the posts and send them to ...
0
votes
3
answers
83
views
How can I set a javascript const to a value in a form element that could be either a dropdown select or a checked radio button?
I have an html form in a django site that is used for both add and update. If the form is for a new entry, I want the field estimateType to be radio buttons with three choices, one of which is checked ...
1
vote
1
answer
88
views
Scroll and nesting issues when rendering multiple reports with Leaflet on a single HTML page
I'm generating a combined report in Django by looping through several database entries and rendering the same HTML template multiple times, each with different data. The template includes Leaflet maps ...
0
votes
0
answers
56
views
when trying to edit child record in django inlineformset factory, I am getting error ORA-00001: unique constraint (SDESERP.UK_CODELKUP) violated
Hi I am trying to create a form with parent-child models using python Django Inlineformset_factory but when I am trying to update the child, its giving me unique constraint error. Here I am sharing my ...
0
votes
0
answers
33
views
single and double quotes in json.parse [duplicate]
How can I pass a list of characters from Django to Javascript?
I'm passing a dictionary from Django to Javascript in the render function. In javascript I parse the data as always using the code
const ...
0
votes
1
answer
101
views
Can't establish connection between web socket and server
I'm building a chat app using Django Channels, Redis and Daphne. When I try to send a message by clicking the submit button, a GET request is made, but I've written JavaScript in my HTML file that's ...
0
votes
0
answers
86
views
django application with firebase authentication
LLMs are failing me on this seemingly simple task, so I'm seeking community advise. I have a django application, which works fine. Both when I develop locally, and in production at https://my.domain
...
-1
votes
1
answer
68
views
Buttons On Click Functioning with same ID different and different attributes [duplicate]
I have an HTML webpage with a sample of buttons as shown part of a Django Application that fills in the name and town after inserting the values:
{% for person in page_obj %}
<button id=&...
1
vote
2
answers
69
views
Django Select2 Autocomplete: How to Pass Extra Parameter (argId) to the View?
I'm using Django with django-autocomplete-light and Select2 to create an autocomplete field. The Select2 field is dynamically added to the page when another field is selected. It fetches data from a ...