alex / alex/django-templatetag-sugar
Support for boolean tags
Open
- Dominant language
- Python
- Stars
- 212
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice to have an easier way to create boolean tags.
Template:
```
{% ifequals thing1 thing2 %}
All Things are created equal
{% else %}
Things are not equal
{% endifequals %}
```
Tag:
```
@boolean_tag(register, [Variable(), Variable()])
def ifequals(context, thing1, thing2):
return thing1 == thing2
```
I took a stab at it in my fork.
seanbrant/django-templatetag-sugar@ea353e5e50152fe5a353e5aa7fff1fdbb76cf2e0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.