diff --git a/frontends/etiquette_flask/backend/jinja_filters.py b/frontends/etiquette_flask/backend/jinja_filters.py index 2f3830c..a58f800 100644 --- a/frontends/etiquette_flask/backend/jinja_filters.py +++ b/frontends/etiquette_flask/backend/jinja_filters.py @@ -1,4 +1,5 @@ import datetime +import itertools import jinja2.filters import voussoirkit.bytestring @@ -45,6 +46,10 @@ def file_link(photo, short=False): basename = jinja2.filters.do_urlencode(photo.basename) return f'/file/{photo.id}/{basename}' +@filter_function +def islice(gen, start, stop): + return itertools.islice(gen, start, stop) + @filter_function def timestamp_to_8601(timestamp): return datetime.datetime.utcfromtimestamp(timestamp).isoformat(' ') + ' UTC' diff --git a/frontends/etiquette_flask/templates/user.html b/frontends/etiquette_flask/templates/user.html index ad58222..59744dd 100644 --- a/frontends/etiquette_flask/templates/user.html +++ b/frontends/etiquette_flask/templates/user.html @@ -1,12 +1,17 @@
+ {% import "album_card.html" as album_card %} + {% import "bookmark_card.html" as bookmark_card %} + {% import "photo_card.html" as photo_card %} + {% import "tag_card.html" as tag_card %} {% import "header.html" as header %}