diff --git a/common/templates/partial/_sidebar.html b/common/templates/partial/_sidebar.html index 5d9da25e..078827db 100644 --- a/common/templates/partial/_sidebar.html +++ b/common/templates/partial/_sidebar.html @@ -78,8 +78,7 @@
{% trans '常用标签' %}
- {% trans '更多' %} + {% trans '更多' %}
{% if book_tags %}
{% trans '书籍' %}
diff --git a/users/templates/users/tags.html b/users/templates/users/tags.html index 3aacadfc..28616e2d 100644 --- a/users/templates/users/tags.html +++ b/users/templates/users/tags.html @@ -20,6 +20,8 @@ + + @@ -35,10 +37,12 @@
{% trans '书籍' %}
{% for v in book_tags %} - + + {{ v.content }} - ({{ v.total }}) + ({{ v.total }}) + {% empty %} {% trans '暂无标签' %} {% endfor %} @@ -46,10 +50,12 @@
{% trans '电影和剧集' %}
{% for v in movie_tags %} - + + {{ v.content }} ({{ v.total }}) + {% empty %} {% trans '暂无标签' %} {% endfor %} @@ -57,10 +63,12 @@
{% trans '音乐' %}
{% for v in music_tags %} - + + {{ v.content }} ({{ v.total }}) + {% empty %} {% trans '暂无标签' %} {% endfor %} @@ -68,10 +76,12 @@
{% trans '游戏' %}
{% for v in game_tags %} - + + {{ v.content }} ({{ v.total }}) + {% empty %} {% trans '暂无标签' %} {% endfor %} diff --git a/users/views.py b/users/views.py index 4dfcaa1d..aed7196f 100644 --- a/users/views.py +++ b/users/views.py @@ -5,7 +5,7 @@ from django.contrib import auth from django.contrib.auth import authenticate from django.core.paginator import Paginator from django.utils.translation import gettext_lazy as _ -from django.core.exceptions import ObjectDoesNotExist +from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.db.models import Count from .models import User, Report, Preference from .forms import ReportForm