mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
improve compatibility with python 3.11 refs #36
This commit is contained in:
parent
c51c735038
commit
1a50509465
10 changed files with 13 additions and 13 deletions
|
@ -130,7 +130,7 @@ def post_to_activity(post: Post, community: Community):
|
|||
"mediaType": "text/markdown"
|
||||
},
|
||||
"attachment": [],
|
||||
"commentsEnabled": True,
|
||||
"commentsEnabled": post.comments_enabled,
|
||||
"sensitive": post.nsfw or post.nsfl,
|
||||
"published": ap_datetime(post.created_at),
|
||||
"audience": f"https://{current_app.config['SERVER_NAME']}/c/{community.name}"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<th>Message</th>
|
||||
<th>JSON</th>
|
||||
</tr>
|
||||
{% for activity in activities %}
|
||||
{% for activity in activities.items %}
|
||||
<tr>
|
||||
<td>{{ moment(activity.created_at).fromNow() }}</td>
|
||||
<td>{{ activity.direction }}</td>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<th>All</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{% for community in communities %}
|
||||
{% for community in communities.items %}
|
||||
<tr>
|
||||
<td>{{ community.name }}</td>
|
||||
<td><img src="{{ community.icon_image('tiny') }}" class="community_icon rounded-circle" loading="lazy" />
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<th>Created</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{% for report in reports %}
|
||||
{% for report in reports.items %}
|
||||
<tr>
|
||||
<td>{{ 'Local' if report.is_local() else 'Remote' }}</td>
|
||||
<td>{{ report.reasons }}</td>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<th>IP</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{% for user in users %}
|
||||
{% for user in users.items %}
|
||||
<tr>
|
||||
<td><img src="{{ user.avatar_thumbnail() }}" class="community_icon rounded-circle" loading="lazy" />
|
||||
{{ user.display_name() }}</td>
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
{% include "community/_community_nav.html" %}
|
||||
{% if post_layout == 'masonry' or post_layout == 'masonry_wide' %}
|
||||
<div class="post_list_{{ post_layout }}">
|
||||
{% for post in posts %}
|
||||
{% for post in posts.items %}
|
||||
{% include 'post/_post_teaser_masonry.html' %}
|
||||
{% else %}
|
||||
<p>{{ _('No posts in this community yet.') }}</p>
|
||||
|
@ -74,7 +74,7 @@
|
|||
</div>
|
||||
{% else %}
|
||||
<div class="post_list">
|
||||
{% for post in posts %}
|
||||
{% for post in posts.items %}
|
||||
{% include 'post/_post_teaser.html' %}
|
||||
{% else %}
|
||||
<p>{{ _('No posts in this community yet.') }}</p>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</nav>
|
||||
<h1 class="mt-2">{{ domain.name }}</h1>
|
||||
<div class="post_list">
|
||||
{% for post in posts %}
|
||||
{% for post in posts.items %}
|
||||
{% include 'post/_post_teaser.html' %}
|
||||
{% else %}
|
||||
<p>{{ _('No posts in this domain yet.') }}</p>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="col-12 col-md-8 position-relative main_pane">
|
||||
{% include "_home_nav.html" %}
|
||||
<div class="post_list">
|
||||
{% for post in posts %}
|
||||
{% for post in posts.items %}
|
||||
{% include 'post/_post_teaser.html' %}
|
||||
{% else %}
|
||||
<p>{{ _('No posts yet. Join some communities to see more.') }}</p>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{% include "community/_community_nav.html" %}
|
||||
{% if post_layout == 'masonry' or post_layout == 'masonry_wide' %}
|
||||
<div class="post_list_{{ post_layout }}">
|
||||
{% for post in posts %}
|
||||
{% for post in posts.items %}
|
||||
{% include 'post/_post_teaser_masonry.html' %}
|
||||
{% else %}
|
||||
<p>{{ _('No posts in this topic yet.') }}</p>
|
||||
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
{% else %}
|
||||
<div class="post_list">
|
||||
{% for post in posts %}
|
||||
{% for post in posts.items %}
|
||||
{% include 'post/_post_teaser.html' %}
|
||||
{% else %}
|
||||
<p>{{ _('No posts in this topic yet.') }}</p>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
{% if posts %}
|
||||
<h2 class="mt-4">Posts</h2>
|
||||
<div class="post_list">
|
||||
{% for post in posts %}
|
||||
{% for post in posts.items %}
|
||||
{% include 'post/_post_teaser.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -79,7 +79,7 @@
|
|||
{% if post_replies %}
|
||||
<h2 class="mt-4" id="comments">Comments</h2>
|
||||
<div class="post_list">
|
||||
{% for post_reply in post_replies %}
|
||||
{% for post_reply in post_replies.items %}
|
||||
{% include 'post/_post_reply_teaser.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue