disqus / gargoyle

Feature switches in Django
http://engineering.disqus.com
Apache License 2.0
746 stars 112 forks source link

add is_active stringfilter #32

Open vad opened 12 years ago

vad commented 12 years ago

With {% ifswitch %} is not possibile to add other conditions, this is a nice complement that can be used if you need to do something like:

    {% if request|is_active:"switchname" and not user.is_anonymous %}
      <my>html</my>
    {% else %}
       <my>other html</my>
    {% endif %}

In this way you don't write <my>other html</my> twice.