Skip to content

Commit

Permalink
templates: adding new template tag to django.html
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewEthanTam committed Nov 20, 2024
1 parent 9b4248e commit 48bb962
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test_app/templates/django/django.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

0 comments on commit 48bb962

Please sign in to comment.