alex / alex/django-templatetag-sugar
Support for boolean tags
Ouverte
- Langage dominant
- Python
- Étoiles
- 212
- Forks
- 37
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.