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" <ingorfano2@gmail.com> wrote:
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.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c62929e8- .f049-43e6-b42a-4217fa9188bb% 40googlegroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAExdeFYp%3DP2ry_N6JY8zd5yQvueBrajyObdWeKas326cOxfShg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment