Commits

Krzysztof Walo  committed d59edef

load_images template tag

  • Participants
  • Parent commits 6f5816a

Comments (0)

Files changed (1)

File gnocchi/gallery/templatetags/gallery.py

         context[varname] = None
     return ''
 
+@register.simple_tag(takes_context=True)
+def load_images(context, gallery, order='order', varname='images'):
+    context[varname] = gallery.images.order_by(order)
+    return ''
+
 
 RE_SIZE = re.compile(r'(\d+)x(\d+)$')