def bootstrap(request, domain): if request.method == "POST": D = Domain.get_by_name(domain) if D.commtrack_enabled: return HttpResponse('already configured', 'text/plain') else: bootstrap_psi.one_time_setup(D) return HttpResponse('set up successfully', 'text/plain') return HttpResponse('<form method="post" action=""><button type="submit">Bootstrap Commtrack domain</button></form>')
def bootstrap(request, domain): if request.method == "POST": D = Domain.get_by_name(domain) if D.commtrack_enabled: return HttpResponse('already configured', 'text/plain') else: bootstrap_psi.one_time_setup(D) return HttpResponse('set up successfully', 'text/plain') return render(request, 'commtrack/debug/bootstrap.html', { 'domain': domain, })
def bootstrap(request, domain): if request.method == "POST": D = Domain.get_by_name(domain) if D.commtrack_enabled: return HttpResponse('already configured', 'text/plain') else: bootstrap_psi.one_time_setup(D) return HttpResponse('set up successfully', 'text/plain') return render(request, 'commtrack/debug/bootstrap.html', { 'domain': domain, } )