minor cleanup

This commit is contained in:
Your Name 2023-12-31 09:54:59 -05:00 committed by Henri Dickson
parent 892ccae330
commit d6cee32ecd
10 changed files with 13 additions and 11 deletions

View file

@ -4,7 +4,7 @@
{% block brief %}
<div class="multi-fields">
{% if item.rating %}
<span class="solo-hidden">{{ item.rating | floatformat:1 }}分({{ item.rating_count }}人)</span>
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
{% endif %}
{% include '_people.html' with people=item.artist role='' max=2 %}
{% include '_people.html' with people=item.genre role='流派' max=5 %}

View file

@ -3,7 +3,7 @@
{% load i18n %}
{% block brief %}
{% if item.rating %}
<span class="solo-hidden">{{ item.rating | floatformat:1 }}分({{ item.rating_count }}人)</span>
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
{% endif %}
{% include '_people.html' with people=item.author role='作者' max=2 %}
{% include '_people.html' with people=item.translator role='译者' max=2 %}

View file

@ -4,7 +4,7 @@
{% block brief %}
<div class="multi-fields">
{% if item.rating %}
<span class="solo-hidden">{{ item.rating | floatformat:1 }}分({{ item.rating_count }}人)</span>
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
{% endif %}
{% if item.other_title %}
{% include '_people.html' with people=item.other_title role='又名' max=2 %}

View file

@ -4,7 +4,7 @@
{% block brief %}
<div class="multi-fields">
{% if item.rating %}
<span class="solo-hidden">{{ item.rating | floatformat:1 }}分({{ item.rating_count }}人)</span>
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
{% endif %}
{% include '_people.html' with people=item.director role='导演' max=2 %}
{% include '_people.html' with people=item.actor role='主演' max=2 %}

View file

@ -4,7 +4,7 @@
{% block brief %}
<div class="multi-fields">
{% if item.rating %}
<span class="solo-hidden">{{ item.rating | floatformat:1 }}分({{ item.rating_count }}人)</span>
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
{% endif %}
{% include '_people.html' with people=item.genre role='类型' max=2 %}
{% include '_people.html' with people=item.playwright role='编剧' max=2 %}

View file

@ -4,7 +4,7 @@
{% block brief %}
<div class="multi-fields">
{% if item.rating %}
<span class="solo-hidden">{{ item.rating | floatformat:1 }}分({{ item.rating_count }}人)</span>
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
{% endif %}
{% include '_people.html' with people=item.genre role='类型' max=2 %}
{% include '_people.html' with people=item.language role='语言' max=5 %}

View file

@ -4,7 +4,7 @@
{% block brief %}
<div class="multi-fields">
{% if item.rating %}
<span class="solo-hidden">{{ item.rating | floatformat:1 }}分({{ item.rating_count }}人)</span>
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
{% endif %}
{% include '_people.html' with people=item.hosts role='主播' max=5 %}
</div>

View file

@ -4,7 +4,7 @@
{% block brief %}
<div class="multi-fields">
{% if item.rating %}
<span class="solo-hidden">{{ item.rating | floatformat:1 }}分({{ item.rating_count }}人)</span>
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
{% endif %}
{% include '_people.html' with people=item.director role='导演' max=2 %}
{% include '_people.html' with people=item.actor role='主演' max=2 %}

View file

@ -4,7 +4,7 @@
{% block brief %}
<div class="multi-fields">
{% if item.rating %}
<span class="solo-hidden">{{ item.rating | floatformat:1 }}分({{ item.rating_count }}人)</span>
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
{% endif %}
{% include '_people.html' with people=item.director role='导演' max=2 %}
{% include '_people.html' with people=item.actor role='主演' max=2 %}

View file

@ -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,