{% load custom_tags_and_filters %} {# Making this condition into number to use it more easily in the template #} {# This is equivalent to display_rate_time = rate_form.time.value or show_rate_time #} {% with form_has_time=rate_form.time.value|yesno:"1,0" show_time_var=show_rate_time|yesno:"1,0" %} {% with display_rate_time=form_has_time|add:show_time_var %}