@one_perm_required_or_403(
    pr_project_add_change,
    (Project, 'slug__exact', 'project_slug')
)
def disable_app(request, project_slug, txapp_slug, **kwargs):
    txapp = get_object_or_404(TxApp, slug=txapp_slug)
    project = get_object_or_404(Project, slug=project_slug)
    url = '/'.join([txapp.url, 'tx/unregister',  project_slug])
    method = 'POST'
    try:
        res = _forward_to_app(url, method)
    except RemoteTxAppError, e:
        return HttpResponse(unicode(e))
    except Exception, e:
        msg = "Uncaught exception while enabling app %(app)s for %(project)s"
        logger.error(
            msg % {'app': txapp_slug, 'project': project_slug}, exc_info=True
        )
        return HttpResponse(unicode(e))
    url = '/'.join([txapp.url, 'tx/translated'])
    WebHook.objects.filter(project=project, url=url).delete()
    txapp.projects.remove(project)
    return HttpResponse('')
Disable an ap for the specified project.
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/addons/txapps/views.py/disable_app