From f68d667f3d972d9c0127ef65d9569fd1dc8917b1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 14 Jul 2024 03:44:49 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/admin.rst | 4 ++-- taggit/admin.py | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/admin.rst b/docs/admin.rst index 6337f733..486cbf24 100644 --- a/docs/admin.rst +++ b/docs/admin.rst @@ -44,7 +44,7 @@ method to the :class:`~django.contrib.admin.ModelAdmin`, using Merging tags in the admin ======================= -Functionality has been added to the admin app to allow for tag "merging". +Functionality has been added to the admin app to allow for tag "merging". Really what is happening is a "find and replace" where the selected tags are being used. To merge your tags follow these steps: @@ -54,4 +54,4 @@ To merge your tags follow these steps: 3. Use the dropdown action list and select `Merge selected tags` and then click `Go` 4. This will redirect you onto a new page where you can insert the new tag name. 5. Click `Merge Tags` -6. This will redirect you back to the tag list \ No newline at end of file +6. This will redirect you back to the tag list diff --git a/taggit/admin.py b/taggit/admin.py index 7dc9df6f..04e7d7fd 100644 --- a/taggit/admin.py +++ b/taggit/admin.py @@ -32,9 +32,7 @@ def get_urls(self): ] return custom_urls + urls - @admin.action( - description="Merge selected tags" - ) + @admin.action(description="Merge selected tags") def render_tag_form(self, request, queryset): selected = request.POST.getlist(admin.helpers.ACTION_CHECKBOX_NAME) if not selected: @@ -84,4 +82,3 @@ def merge_tags_view(self, request): } return render(request, "admin/taggit/merge_tags_form.html", context) -