Why do you want to set it in custom template. It would be better if you put
this variable in context dictionary while rendering and then use it in the
template on the basis of condition.
Thanks and regards,
Mahendra
On 4 Apr 2017 7:44 p.m., "valerio orfano" wrote:
> Hi there
>
> is there any c
You can use the {% with %} tag.
https://docs.djangoproject.com/en/1.10/ref/templates/builtins/#with
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of valerio orfano
Sent: Tuesday, April 4, 2017 9:15 AM
To: Django users
Subject: Setting variable in custom
Hi there
is there any chance to set the value of variable in django custom template?
I am looking for something like {set variable = "test"}
But i Cannot make it to work!
Any clue?
rgds valerio
--
You received this message because you are subscribed to the Google Groups
"Django users" group
3 matches
Mail list logo