From 530b3126fc08149001295e5e72fe3d21bf8758f4 Mon Sep 17 00:00:00 2001 From: matthewt Date: Mon, 18 Nov 2024 08:44:36 +0200 Subject: [PATCH] templates: adding new template tag to django.html --- test_app/templates/django/django.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test_app/templates/django/django.html b/test_app/templates/django/django.html index 9a966df4..600cdbea 100644 --- a/test_app/templates/django/django.html +++ b/test_app/templates/django/django.html @@ -40,4 +40,23 @@ sample_var off {% endsample %} +{% flag_is_active "flag" request True as is_flag_active %} +{% if is_flag_active %} + flag_is_active on +{% else %} + flag_is_active off +{% endif %} + +{% if "switch"|switch_is_active %} + switch_is_active on +{% else %} + switch_is_active off +{% endif %} + +{% if "sample"|sample_is_active %} + sample_is_active on +{% else %} + sample_is_active off +{% endif %} + {% wafflejs %}