diff --git a/export.py b/export.py index 0521519..0aa1506 100755 --- a/export.py +++ b/export.py @@ -12,7 +12,7 @@ if not wallet.connected: print('Wallet not connected') exit() -all_posts = Post.select().order_by(Post.timestamp.desc()) +all_posts = Post.select().order_by(Post.timestamp.asc()) all_mods = Moderator.select() all_profiles = Profile.select() all_bans = Ban.select() @@ -49,8 +49,11 @@ for post in all_posts: 'out': True }) } + txes = 0 all_data['posts'].append(post_data) - print(f'Exporting post {post.id}') + if 'in' in post_data['txes']: + txes = len(post_data['txes']['in']) + print(f'Exporting post {post.id}. Found {txes} txes') for mod in all_mods: all_data['moderators'].append(mod.username) diff --git a/suchwow/templates/post/read.html b/suchwow/templates/post/read.html index 474d0b3..0d163b7 100644 --- a/suchwow/templates/post/read.html +++ b/suchwow/templates/post/read.html @@ -35,7 +35,7 @@ -
+

{{ post.title }}

{{ post.text }}

@@ -44,14 +44,18 @@ Reject {% endif %}

Submitted by {{ post.user.username }} at {{ post.timestamp }}

+
{% if post.get_image_path().endswith('mp4') %} {% else %} + SuchWow #{{ post.id }} - {{ post.title }} by {{ post.user.username }} + {% endif %} +