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

@ -14,7 +14,7 @@
<p class="subtitle">{{ post.text }}</p> <p class="subtitle">{{ post.text }}</p>
<p class="subtext">Submitted by <i><u>{{ post.submitter }}</u></i> at <i>{{ post.timestamp }}</i></p> <p class="subtext">Submitted by <i><u>{{ post.submitter }}</u></i> at <i>{{ post.timestamp }}</i></p>
<br> <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> <hr>
<!-- Payments --> <!-- Payments -->

@ -10,8 +10,8 @@
{% if posts %} {% if posts %}
<ul style="list-style-type:none;"> <ul style="list-style-type:none;">
{% for post in posts | sort(attribute='balance') %} {% 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].balance }} WOW received</li> <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 %} {% endfor %}
</ul> </ul>
{% else %} {% else %}

Loading…
Cancel
Save