Re: variable in django template

2013-10-23 Thread Leonardo Giordani
Indeed this is a good solution. Just a typo correction, use "%" instead of "@". Leo Leonardo Giordani Author of The Digital Cat My profile on About.me - My GitHub page- My Coderwall profile

Re: variable in django template

2013-10-23 Thread Nicolas Pantel
Take a look at the "{@ with @}" template tag in the documentation. Use {@ with myVariable=someValue @} ... {@ endwith @}. NicoP Le 23 oct. 2013 07:01, "Harjot Mann" a écrit : > > I want to initialize a varibale in django template from zero, which I > want to comapre with the some job_no whihc is

Re: variable in django template

2013-10-23 Thread Leonardo Giordani
Hi, everything you need in a template can be prepared in a view, so if you need a specific value just pass a context key with that very value. Otherwise, if you need a list of integers, just pass a range(N) list. There is a plenty of builtin filters and tags you can then use to manage it. If you