Commits

Anonymous committed e20cf87

fix

Comments (0)

Files changed (2)

jingo_tags/django/helpers.py

 
 @register.filter
 def default(value, default_value):
-    if value == '':
-        return ''
     if not bool(value):
         return default_value
     return value

jingo_tags/examples.txt

-Alternatives to default django template tags:
+=========DJANGO TAGS==========
 
 {% variable|default:'test' %}
 {{ variable|default('default_value') }}
 
 {% if variable|divisibleby:"3" %}
 {% if variable is divisibleby 3 %}
+
+
+=========GUARDIAN TAGS=========
+{% set perms = get_perms(user, object) %}
+{% if 'can_edit' in perms %}
+You can edit this object.
+{% endif %}
+
+
+=========SORL-THUMBNAIL TAGS=========