Re: django variables in template

2007-02-07 Thread Mae
It sounds like you're passing the variable in your context, but {{x}} doesn't get converted to {{some_value}} in the script text. This may be because you're html-including the script in your page without passing it through urls.py first. Here's what I do: 1) the scripts that need to get

Re: django variables in template

2007-02-06 Thread Joseph Heck
/java/javascript/ On 2/6/07, Joseph Heck <[EMAIL PROTECTED]> wrote: > > assign it in java - just expect {{ variable_x }} to get replaced with > whatever you've pushed into the context from the view... > > i.e. > > > var x = {{ variable_x }} > ... > > > On 2/6/07, damacy <[EMAIL PROTECTED]>

Re: django variables in template

2007-02-06 Thread Joseph Heck
assign it in java - just expect {{ variable_x }} to get replaced with whatever you've pushed into the context from the view... i.e. var x = {{ variable_x }} ... On 2/6/07, damacy <[EMAIL PROTECTED]> wrote: > > > hi, there. > > i'm a writing a template with a section of javascript code in it.

django variables in template

2007-02-06 Thread damacy
hi, there. i'm a writing a template with a section of javascript code in it. i need to use django variables in the script and just wondering how i can do it. i tried {{ variable_x }} but it does not seem to work. has anyone any clue? --~--~-~--~~~---~--~~