remove unused var, make images larger, and try to fix sorting

graphs-n-shit
lza_menace 4 years ago
parent 5c0cfdaa90
commit fc6674d9eb

@ -15,7 +15,6 @@ def top():
top_posts = {}
posts = Post.select()
for post in posts:
balance = float(wownero.Wallet().balances(post.account_index)[1])
transfers = []
incoming = wownero.Wallet().incoming_transfers(post.account_index)
if "transfers" in incoming:
@ -25,7 +24,7 @@ def top():
if total > 0:
top_posts[post.id] = {
"post": post,
"balance": total
"total": float(total)
}
return render_template("post/top.html", posts=top_posts)

@ -14,7 +14,7 @@
<p class="subtitle">{{ post.text }}</p>
<p class="subtext">Submitted by <i><u>{{ post.submitter }}</u></i> at <i>{{ post.timestamp }}</i></p>
<br>
<img src="{{ url_for('post.uploaded_file', filename=post.image_name) }}" width=500/ style="margin-bottom:1em;border-radius:4px;">
<img src="{{ url_for('post.uploaded_file', filename=post.image_name) }}" width=600/ style="margin-bottom:1em;border-radius:4px;">
<hr>
<!-- Payments -->

@ -10,8 +10,8 @@
{% if posts %}
<ul style="list-style-type:none;">
{% for post in posts | sort(attribute='balance') %}
<li>#{{ posts[post].post.id }} - <a href="{{ url_for('post.read', id=posts[post].post.id) }}">{{ posts[post].post.title }}</a> - {{ posts[post].post.submitter }} - {{ posts[post].balance }} WOW received</li>
{% for post in posts | sort(attribute='total') %}
<li>#{{ posts[post].post.id }} - <a href="{{ url_for('post.read', id=posts[post].post.id) }}">{{ posts[post].post.title }}</a> - {{ posts[post].post.submitter }} - {{ posts[post].total }} WOW received</li>
{% endfor %}
</ul>
{% else %}

Loading…
Cancel
Save