variable - templates folder django




Check for request.GET variable in the template (2)

I want to display a certain in the template only if a certain GET variable is set....I thought using {% if request.get.my_var %} would work, but it's not giving me the results.



Variables are case-sensitive - so, assuming as lazerscience points out that you actually have the request object in the context, you would need to use {% if request.GET.my_var %}.





templates