Merge pull request #2782 from ranok/list_fix
Small quality of life improvements to list handling
This commit is contained in:
commit
8e25ae34d6
2 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
{% if list.curation == 'group' %}
|
{% if list.curation == 'group' %}
|
||||||
{% blocktrans with username=list.user.display_name userpath=list.user.local_path groupname=list.group.name grouppath=list.group.local_path %}Created by <a href="{{ userpath }}">{{ username }}</a> and managed by <a href="{{ grouppath }}">{{ groupname }}</a>{% endblocktrans %}
|
{% blocktrans with username=list.user.display_name userpath=list.user.local_path groupname=list.group.name grouppath=list.group.local_path %}Created by <a href="{{ userpath }}">{{ username }}</a> and managed by <a href="{{ grouppath }}">{{ groupname }}</a>{% endblocktrans %}
|
||||||
{% elif list.curation != 'open' %}
|
{% elif list.curation == 'curated' %}
|
||||||
{% blocktrans with username=list.user.display_name path=list.user.local_path %}Created and curated by <a href="{{ path }}">{{ username }}</a>{% endblocktrans %}
|
{% blocktrans with username=list.user.display_name path=list.user.local_path %}Created and curated by <a href="{{ path }}">{{ username }}</a>{% endblocktrans %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% blocktrans with username=list.user.display_name path=list.user.local_path %}Created by <a href="{{ path }}">{{ username }}</a>{% endblocktrans %}
|
{% blocktrans with username=list.user.display_name path=list.user.local_path %}Created by <a href="{{ path }}">{{ username }}</a>{% endblocktrans %}
|
||||||
|
|
|
@ -8,7 +8,7 @@ from django.db import transaction
|
||||||
from django.db.models import Avg, DecimalField, Q, Max
|
from django.db.models import Avg, DecimalField, Q, Max
|
||||||
from django.db.models.functions import Coalesce
|
from django.db.models.functions import Coalesce
|
||||||
from django.http import HttpResponseBadRequest, HttpResponse
|
from django.http import HttpResponseBadRequest, HttpResponse
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404, redirect
|
||||||
from django.template.response import TemplateResponse
|
from django.template.response import TemplateResponse
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.decorators import method_decorator
|
from django.utils.decorators import method_decorator
|
||||||
|
@ -183,7 +183,7 @@ def delete_list(request, list_id):
|
||||||
book_list.raise_not_deletable(request.user)
|
book_list.raise_not_deletable(request.user)
|
||||||
|
|
||||||
book_list.delete()
|
book_list.delete()
|
||||||
return redirect_to_referer(request, "lists")
|
return redirect("/list")
|
||||||
|
|
||||||
|
|
||||||
@require_POST
|
@require_POST
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue