(self, **kwargs)
return context
Utility method when you want to display nested objects
            (such as during a bulk update/delete)
Utility method when you want to display nested objects
            (such as during a bulk update/delete)
Utility method when you want to display nested objects ( such as during a bulk update / delete )
def get_context_data(self, **kwargs):
        """ Utility method when you want to display nested objects
            (such as during a bulk update/delete)
        """
        context = super().get_context_data()

        def _format_callback(obj):
            opts = utils.model_options(obj)
            return '%s: %s' % (force_str(capfirst(opts.verbose_name)),
                               force_str(obj))

        using = router.db_for_write(self.model)

        collector = utils.NestedObjects(using=using)
        collector.collect(self.queryset)

        context.update({
            'view': self,
            'objects_name': self.objects_name,
            'queryset': self.queryset,
            'deletable_objects': collector.nested(_format_callback),
        })

        return context
def get_context_data ( self , * * kwargs ) : context = super ( ) . get_context_data ( ) def _format_callback ( obj ) : opts = utils . model_options ( obj ) return '%s: %s' % ( force_str ( capfirst ( opts . verbose_name ) ) , force_str ( obj ) ) using = router . db_for_write ( self . model ) collector = utils . NestedObjects ( using = using ) collector . collect ( self . queryset ) context . update ( { 'view' : self , 'objects_name' : self . objects_name , 'queryset' : self . queryset , 'deletable_objects' : collector . nested ( _format_callback ) , } ) return context