in my program javascript dont read the data which is got from django but
the same page html tag the the data.
here is my code
var bubbleChartData = {
datasets: [ {
label: "Graph of Attacks",
backgroundColor:"#FF6384",
Thanks!!!
This helped a lot. Now it is working as I was hoping :)
drakko
trešdiena, 2013. gada 16. oktobris 16:14:39 UTC+2, ke1g rakstīja:
>
>
> On Wed, Oct 16, 2013 at 3:39 AM, drakko >wrote:
>
>> ...
>>
>
>
>> But accessing should_have_found_list in template has no
On Wed, Oct 16, 2013 at 3:39 AM, drakko wrote:
> ...
>
> But accessing should_have_found_list in template has no problems. I have
> separate JS file that contains functions (event handlers for buttons etc.).
> I can't figure out (total newbie in JS :D ) how to access (or
Thanks for help. I will try some of these ideas :)
I don't understand why you are JSON encoding form.field_mapping for the
> fields template variable.
>
This was like that when I got this code. I am just continuing to develop
this app.
But accessing should_have_found_list in template has no
On Tue, Oct 15, 2013 at 9:54 AM, Scot Hacker wrote:
>
>
> On Tuesday, October 15, 2013 8:45:09 AM UTC-7, larry@gmail.com wrote:
>>
>>
>>>
>> You can embed js anywhere in your template, e.g.:
>>
>> {% for shbf in should_have_found_list %}
>>
>>
I'd probably put the script tag outside the for loop.
But I don't see where you're passing should_have_found_list to the
context. If it's an item (top level) in form.field_mapping, then it needs
to be something like:
...
{% for shbr in form.field_mapping.should_have_found_list %}
...
I
On Tuesday, October 15, 2013 8:45:09 AM UTC-7, larry@gmail.com wrote:
>
>
>>
> You can embed js anywhere in your template, e.g.:
>
> {% for shbf in should_have_found_list %}
>
> my_js_function(shbf);
>
> {% endfor %}
>
I think you meant to write:
On Tue, Oct 15, 2013 at 6:46 AM, drakko wrote:
> Hello!
>
> I'm new to Django and Javascript and so I need some help with passing list
> from django template to Javascript.
>
> The list is available in template (template.html) by using
>
> {% for shbf in
Hello!
I'm new to Django and Javascript and so I need some help with passing list
from django template to Javascript.
The list is available in template (template.html) by using
{% for shbf in should_have_found_list %}
but I have no idea how to access this list from Javascript.
The
9 matches
Mail list logo