Linked Questions

60 votes
8 answers
94k views

I'm using Django and Apache to serve webpages. My JavaScript code currently includes a data object with values to be displayed in various HTML widgets based on the user's selection from a menu of ...
chernevik's user avatar
  • 4,010
41 votes
4 answers
48k views

This question must be obvious but I can't figure it out. In a template, I link to a js file in my media directory. From that file, I would like to access a context variable like {{my_chart}}. But is ...
user963936's user avatar
10 votes
5 answers
20k views

I used to "tie" my data to the DOM until I've discovered the data binding libraries. My question, say I have a table which contains model records, how can I build that table with JS, i.e pass the ...
user3599803's user avatar
  • 7,084
2 votes
3 answers
7k views

I am working on a Django project. I would like to pass a data from Django's views.py into a javascript file, run the js function then render the return value into my html page. I am not using a form ...
Marvin's user avatar
  • 243
1 vote
2 answers
2k views

I am facing some problems trying to access a context variable in my django views in my html javascript. I would like to access 'unclean' context which is a list and USE IT AS A LIST in my html script ...
Ang Yang Cheng's user avatar
1 vote
0 answers
1k views

I have table data in PostGreSQL which is easily accessed in my Django View. Now I want to pass this data to a javascript .js file whose purpose is to use this data and visualize using d3.js This is ...
Surya Tej's user avatar
  • 1,430
1 vote
4 answers
839 views

I am stuck using <script> tags to render a googlemaps api window in my django webapp. In my views I passed my data as such: def map_view(request): context = { 'title': 'My Map', ...
J.C's user avatar
  • 260
0 votes
1 answer
537 views

In the js file below 'use strict'; $(document).ready(function() { buildchart() $(window).on('resize', function() { buildchart(); }); $('#mobile-collapse').on('click', function()...
Sammy's user avatar
  • 321
0 votes
1 answer
435 views

I'm trying to generate a code for editing posts using modal that are made before but it shows "Identifier or string literal or numeric literal expected" and "Statement expected" ...
pegah's user avatar
  • 1
0 votes
0 answers
161 views

I have a django template in which a logged in user can check his/her account balance. The balance is obtained in the django template through a form labelled as 'form0'. Now I want to display this user ...
DHRUV KAUSHAL's user avatar
0 votes
1 answer
53 views

I am having a dict statistics in my view.py and give it as param in my context to my index.html. There I want to use it in my html like {{ statistics.key1 }}. But I also want to use it in js. When ...
progNewbie's user avatar
  • 4,942
1 vote
0 answers
47 views

Basically, I'm trying to make an edit profile modal with fields that are already prepopulated by the user's original data. I passed django models into my javascript files by using these brackets {{}} ...
sy89's user avatar
  • 193
31 votes
2 answers
5k views

The JSON standard defines objects in one way and the ECMAScript (JavaScript) standard defines it in another. It is often said that JSON objects are a subset of JavaScript objects, is this true? Is ...
Benjamin Gruenbaum's user avatar
8 votes
6 answers
21k views

The concept comes from this http://www.prepbootstrap.com/bootstrap-template/real-estate-list-map-dynamic I enable 2 blocks in a django template, left blockshows device info (device name and location ...
rubinlululu's user avatar
5 votes
1 answer
16k views

I'm trying to make a gallery page using django/js/jquery. Is it possible to pass django template variables to the javascript? I need to implement for loop like: {% for post in object_list %} {% ...
stk-13's user avatar
  • 97

15 30 50 per page
1
2 3 4 5