Answer the question
In order to leave comments, you need to log in
How to display the {{ value}} variable in a Django template only when a menu item is clicked?
Good day
There is a menu, something like this:
<li class="hassubs">
<a href="#">Select<i class="fas fa-chevron-down"></i></a>
<ul>
<li><a href="#"> Value_1{{ set_value_1}} </a></li>
<li><a href="#"> Value_2{{ set_value_2}} </a></li>
</ul>
</li>
def set_value_1(self):
self.currency['var']= 'var1'
self.session.modified = True
def set_value_2(self):
self.currency['var']= 'var2'
self.session.modified = True
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question