Answer the question
In order to leave comments, you need to log in
How to use assignment in Django template engine?
I would like to use something like
{% if user.user.detail.lang = "eng" %}
eng = True
{% end if%}
{% if eng %}
Astalavista baby
{% endif %}
делать одно и тоже для каждой вюхи как то нехочется
Answer the question
In order to leave comments, you need to log in
What for? There are also translation files and tags {% trans %}, {% blocktrans %}.
If you still want to have the eng variable in the templates, then make your own context processor.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question