diff --git a/HISTORY.rst b/HISTORY.rst index 4193c968d9..450d1aac3b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -16,6 +16,8 @@ * Remove tag create event registration from the tag instances. The tag create event is not applicable to existing tags. +* Add proper redirection after moving a document to the + trash. 3.2.3 (2019-06-21) ================== diff --git a/docs/releases/3.2.4.rst b/docs/releases/3.2.4.rst index e8a6c9fdf8..8c33c8b0f2 100644 --- a/docs/releases/3.2.4.rst +++ b/docs/releases/3.2.4.rst @@ -30,6 +30,8 @@ Changes - Remove tag create event registration from the tag instances. The tag create event is not applicable to existing tags. +- Add proper redirection after moving a document to the + trash. Removals -------- diff --git a/mayan/apps/documents/views/trashed_document_views.py b/mayan/apps/documents/views/trashed_document_views.py index c12783b014..bf783303ed 100644 --- a/mayan/apps/documents/views/trashed_document_views.py +++ b/mayan/apps/documents/views/trashed_document_views.py @@ -10,6 +10,7 @@ from mayan.apps.acls.models import AccessControlList from mayan.apps.common.generics import ( ConfirmView, MultipleObjectConfirmActionView ) +from mayan.apps.common.settings import setting_home_view from ..icons import icon_document_list_deleted from ..models import DeletedDocument, Document @@ -33,6 +34,7 @@ class DocumentTrashView(MultipleObjectConfirmActionView): model = Document object_permission = permission_document_trash pk_url_kwarg = 'pk' + post_action_redirect = reverse_lazy(viewname=setting_home_view.value) success_message_singular = _( '%(count)d document moved to the trash.' )