Exemple #1
0
 def get_context_data(self, **kwargs):
     """Judge Delete."""
     context = super(FolderDeleteView, self).get_context_data(**kwargs)  # noqa
     #
     deletable_objects, model_count, protected = get_deleted_objects([self.object])  # noqa
     #
     context['deletable_objects'] = deletable_objects
     context['model_count'] = dict(model_count).items()
     context['protected'] = protected
     #
     return context
Exemple #2
0
    def get_context_data(self, **kwargs):
        """get_context_data.

        Args:
            **kwargs: Description

        Returns:
            TYPE: Description
        """
        context = super(RoleDeleteView, self).get_context_data(**kwargs)
        deletable_objects, model_count, protected = get_deleted_objects(
            [self.object])
        context['deletable_objects'] = deletable_objects
        context['model_count'] = dict(model_count).items()
        context['protected'] = protected
        #
        return context