def add_popup(request,app_label,model): 
    themodel = models.get_model(app_label, model) 
    admin = site._registry[themodel]

    admin.admin_site.root_path = "/ajax_select/" # warning: your URL should be configured here. I should be able to auto-figure this out but ...

    response = admin.add_view(request,request.path)
    if request.method == 'POST':
        if response.content.startswith('<script type="text/javascript">opener.dismissAddAnotherPopup'):
            return HttpResponse( response.content.replace('dismissAddAnotherPopup','didAddPopup' ) )
    return response
Register a listener that will be notified of incoming messages and
dataset/ETHPy150Open caseywstark/colab/colab/apps/ajax_select/views.py/add_popup--crossover with--dataset/ETHPy150Open ncclient/ncclient/ncclient/transport/session.py/Session.add_listener