Add post action redirect and improve title of the ACL delete view.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user