Re: How template tag can receive values JS

2013-08-01 Thread Bill Freeman
If this is only to be done when loading a new page, then you could add the JS var value to the request as a query parameter. Then the view would have to pass the value to the template for the new page. On Thu, Aug 1, 2013 at 9:51 AM, Christian Erhardt < christian.erha...@mojo2k.de> wrote: > No,

How template tag can receive values JS

2013-08-01 Thread Christian Erhardt
No, what you are trying is not possible. The template tags are rendered on the server. They never appear on the client machine. Javascript is running on the client machine. They both will never see each other. You will always have to do a roundtrip to interact between Javascript and django temp

Re: How template tag can receive values JS

2013-08-01 Thread Larry Martell
On Thu, Aug 1, 2013 at 6:48 AM, Mário Idival wrote: > Good morning everyone, > I wonder how I can do (and if it is possible), pass a value of javascript > variable to a template tag Django. > > eg > how it works: > {{Document.id | split_filter}} -> split_filter is just a random method, > receives

How template tag can receive values JS

2013-08-01 Thread Mário Idival
Good morning everyone, I wonder how I can do (and if it is possible), pass a value of javascript variable to a template tag Django. eg how it works: {{Document.id | split_filter}} -> split_filter is just a random method, receives an ID as would {{"Value Var JS" | split_filter}} -> pass the id tha