def delete(self, request, relation_html_id):
        """
        Delete a plugin.

        Parameters :
          - pk : PluginRelation.id.
        """

        pk = check_object_html_id(relation_html_id)[1]

        try:
            obj = PluginRelation.objects.filter(pages__website__exact=request.website, 
                                                id__exact=pk)[0]
        except __HOLE__:
            raise Http404

        obj.delete()
        
        response = Response(status.HTTP_200_OK,
                            {"msg": MESSAGES.get('plugin_delete_success', '')})
        return self.render(response)
dataset/ETHPy150Open ionyse/ionyweb/ionyweb/administration/views/plugin.py/PluginView.delete