Add post action redirect and improve title of the ACL delete view.

This commit is contained in:
Roberto Rosario
2015-09-07 00:26:50 -04:00
parent c48b238c9e
commit b7a3a7b4ef

View File

@@ -129,8 +129,18 @@ class ACLDeleteView(SingleObjectDeleteView):
def get_extra_context(self):
return {
'object': self.get_object().content_object,
'title': _('Delete ACL: %s') % self.get_object(),
}
def get_post_action_redirect(self):
instance = self.get_object()
return reverse(
'acls:acl_list', args=(
instance.content_type.app_label,
instance.content_type.model, instance.object_id
)
)
class ACLPermissionsView(AssignRemoveView):
grouped = True