Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add appropriately named action to unpublish #166

Merged
merged 1 commit into from
Oct 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions djangocms_moderation/admin_actions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from collections import defaultdict
from functools import partial

from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
Expand Down Expand Up @@ -153,9 +154,11 @@ def add_items_to_collection(modeladmin, request, queryset):
return HttpResponseRedirect(request.META.get("HTTP_REFERER"))


add_items_to_collection.short_description = _(
"Add to moderation collection"
) # noqa: E305
add_items_to_collection.short_description = _("Add to moderation collection")

add_item_to_unpublish_collection = partial(add_items_to_collection)
add_item_to_unpublish_collection.__name__ = 'add_item_to_unpublish_collection'
add_item_to_unpublish_collection.short_description = _('Add items to a collection to unpublish')


def post_bulk_actions(collection):
Expand Down