diff --git a/sarsoo/art/art.py b/sarsoo/art/art.py index 0f8d315..97e32b3 100644 --- a/sarsoo/art/art.py +++ b/sarsoo/art/art.py @@ -14,8 +14,8 @@ art_print = Blueprint('art', __name__, template_folder='templates') @art_print.route('/') def root(): tags = getTagDicts() - print(tags) - return render_template('art/index.html', tags = tags, urlprefix = urlprefix) + #print(tags) + return render_template('art/index.html', tags = tags, staticroot = staticbucketurl, urlprefix = urlprefix) @art_print.route('/') def tag_view(tag): diff --git a/sarsoo/art/db.py b/sarsoo/art/db.py index f717f30..2f39ffd 100644 --- a/sarsoo/art/db.py +++ b/sarsoo/art/db.py @@ -16,6 +16,9 @@ def getTagDicts(): dicts = [] for tag in tags: dicts.append(tag.to_dict()) + + for artdict in dicts: + artdict['splash'] = artdict['splash'].get().to_dict() return dicts diff --git a/sarsoo/art/templates/art/index.html b/sarsoo/art/templates/art/index.html index ae9612e..4aff352 100644 --- a/sarsoo/art/templates/art/index.html +++ b/sarsoo/art/templates/art/index.html @@ -3,12 +3,14 @@ {% block title %}dev{% endblock %} {% block content %} - {% for row in tags|batch(2) %} + {% for row in tags|batch(4) %}
{% for tag in row %} -
+

{{ tag.name }}

-

{{ tag.description }}

+ {{ tag.splash.file_name  }} + +

{{ tag.description }}{{ tag.image }}

view
{% endfor %}