def add_template_context(self, context, request, selected_options, default_view_tax=False, **kwargs):
        from product.utils import productvariation_details, serialize_options

        selected_options = self._unique_ids_from_options(selected_options)

        options = serialize_options(self, selected_options)
        if not 'options' in context:
            context['options'] = options
        else:
            curr = list(context['options'])
            curr.extend(list(options))
            context['options'] = curr

        details = productvariation_details(self.product, default_view_tax,
                                           request.user)
        if 'details' in context:
            context['details'].update(details)
        else:
            context['details'] = details

        return context
Instance is not actually deleted from DB- just flagged as inactive, which hides it from list views
dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/product/modules/configurable/models.py/ConfigurableProduct.add_template_context--crossover with--dataset/ETHPy150Open CenterForOpenScience/osf.io/api/applications/views.py/ApplicationDetail.perform_destroy