From d6cee32ecd512e1ffe62feb9cff83c38f22e5982 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 31 Dec 2023 09:54:59 -0500 Subject: [PATCH] minor cleanup --- catalog/templates/_item_card_metadata_album.html | 2 +- catalog/templates/_item_card_metadata_edition.html | 2 +- catalog/templates/_item_card_metadata_game.html | 2 +- catalog/templates/_item_card_metadata_movie.html | 2 +- catalog/templates/_item_card_metadata_performance.html | 2 +- .../_item_card_metadata_performanceproduction.html | 2 +- catalog/templates/_item_card_metadata_podcast.html | 2 +- catalog/templates/_item_card_metadata_tvseason.html | 2 +- catalog/templates/_item_card_metadata_tvshow.html | 2 +- journal/views/collection.py | 6 ++++-- 10 files changed, 13 insertions(+), 11 deletions(-) diff --git a/catalog/templates/_item_card_metadata_album.html b/catalog/templates/_item_card_metadata_album.html index dc7f3daf..4b7a71f0 100644 --- a/catalog/templates/_item_card_metadata_album.html +++ b/catalog/templates/_item_card_metadata_album.html @@ -4,7 +4,7 @@ {% block brief %}
{% if item.rating %} - {{ item.rating | floatformat:1 }}分({{ item.rating_count }}人) + {{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分) {% endif %} {% include '_people.html' with people=item.artist role='' max=2 %} {% include '_people.html' with people=item.genre role='流派' max=5 %} diff --git a/catalog/templates/_item_card_metadata_edition.html b/catalog/templates/_item_card_metadata_edition.html index 0a4b5cc4..99c47fc7 100644 --- a/catalog/templates/_item_card_metadata_edition.html +++ b/catalog/templates/_item_card_metadata_edition.html @@ -3,7 +3,7 @@ {% load i18n %} {% block brief %} {% if item.rating %} - {{ item.rating | floatformat:1 }}分({{ item.rating_count }}人) + {{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分) {% endif %} {% include '_people.html' with people=item.author role='作者' max=2 %} {% include '_people.html' with people=item.translator role='译者' max=2 %} diff --git a/catalog/templates/_item_card_metadata_game.html b/catalog/templates/_item_card_metadata_game.html index d737b93c..23e17236 100644 --- a/catalog/templates/_item_card_metadata_game.html +++ b/catalog/templates/_item_card_metadata_game.html @@ -4,7 +4,7 @@ {% block brief %}
{% if item.rating %} - {{ item.rating | floatformat:1 }}分({{ item.rating_count }}人) + {{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分) {% endif %} {% if item.other_title %} {% include '_people.html' with people=item.other_title role='又名' max=2 %} diff --git a/catalog/templates/_item_card_metadata_movie.html b/catalog/templates/_item_card_metadata_movie.html index dcbfb4a5..0ef243fc 100644 --- a/catalog/templates/_item_card_metadata_movie.html +++ b/catalog/templates/_item_card_metadata_movie.html @@ -4,7 +4,7 @@ {% block brief %}
{% if item.rating %} - {{ item.rating | floatformat:1 }}分({{ item.rating_count }}人) + {{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分) {% endif %} {% include '_people.html' with people=item.director role='导演' max=2 %} {% include '_people.html' with people=item.actor role='主演' max=2 %} diff --git a/catalog/templates/_item_card_metadata_performance.html b/catalog/templates/_item_card_metadata_performance.html index 282429a1..e9e257dd 100644 --- a/catalog/templates/_item_card_metadata_performance.html +++ b/catalog/templates/_item_card_metadata_performance.html @@ -4,7 +4,7 @@ {% block brief %}
{% if item.rating %} - {{ item.rating | floatformat:1 }}分({{ item.rating_count }}人) + {{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分) {% endif %} {% include '_people.html' with people=item.genre role='类型' max=2 %} {% include '_people.html' with people=item.playwright role='编剧' max=2 %} diff --git a/catalog/templates/_item_card_metadata_performanceproduction.html b/catalog/templates/_item_card_metadata_performanceproduction.html index a795fad3..b2f1e7e3 100644 --- a/catalog/templates/_item_card_metadata_performanceproduction.html +++ b/catalog/templates/_item_card_metadata_performanceproduction.html @@ -4,7 +4,7 @@ {% block brief %}
{% if item.rating %} - {{ item.rating | floatformat:1 }}分({{ item.rating_count }}人) + {{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分) {% endif %} {% include '_people.html' with people=item.genre role='类型' max=2 %} {% include '_people.html' with people=item.language role='语言' max=5 %} diff --git a/catalog/templates/_item_card_metadata_podcast.html b/catalog/templates/_item_card_metadata_podcast.html index 1f5dbf34..ef7cbe62 100644 --- a/catalog/templates/_item_card_metadata_podcast.html +++ b/catalog/templates/_item_card_metadata_podcast.html @@ -4,7 +4,7 @@ {% block brief %}
{% if item.rating %} - {{ item.rating | floatformat:1 }}分({{ item.rating_count }}人) + {{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分) {% endif %} {% include '_people.html' with people=item.hosts role='主播' max=5 %}
diff --git a/catalog/templates/_item_card_metadata_tvseason.html b/catalog/templates/_item_card_metadata_tvseason.html index dcbfb4a5..0ef243fc 100644 --- a/catalog/templates/_item_card_metadata_tvseason.html +++ b/catalog/templates/_item_card_metadata_tvseason.html @@ -4,7 +4,7 @@ {% block brief %}
{% if item.rating %} - {{ item.rating | floatformat:1 }}分({{ item.rating_count }}人) + {{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分) {% endif %} {% include '_people.html' with people=item.director role='导演' max=2 %} {% include '_people.html' with people=item.actor role='主演' max=2 %} diff --git a/catalog/templates/_item_card_metadata_tvshow.html b/catalog/templates/_item_card_metadata_tvshow.html index dcbfb4a5..0ef243fc 100644 --- a/catalog/templates/_item_card_metadata_tvshow.html +++ b/catalog/templates/_item_card_metadata_tvshow.html @@ -4,7 +4,7 @@ {% block brief %}
{% if item.rating %} - {{ item.rating | floatformat:1 }}分({{ item.rating_count }}人) + {{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分) {% endif %} {% include '_people.html' with people=item.director role='导演' max=2 %} {% include '_people.html' with people=item.actor role='主演' max=2 %} diff --git a/journal/views/collection.py b/journal/views/collection.py index f43c566b..fe6fe66b 100644 --- a/journal/views/collection.py +++ b/journal/views/collection.py @@ -310,8 +310,10 @@ def collection_edit(request: AuthedHttpRequest, collection_uuid=None): @target_identity_required def user_collection_list(request: AuthedHttpRequest, user_name): target = request.target_identity - collections = Collection.objects.filter(owner=target).filter( - q_owned_piece_visible_to_user(request.user, target) + collections = ( + Collection.objects.filter(owner=target) + .filter(q_owned_piece_visible_to_user(request.user, target)) + .order_by("-edited_time") ) return render( request,