def build(request): """ Build KS and later Image """ spin_id = request.POST.get('spin_id') new_ks = build_ks(spin_id) spin = get_spin(spin_id) return render_to_response('build.html', {'ks': new_ks, 'spin': spin})
def build(request): """ Build KS and later Image """ spin_id = request.POST.get('spin_id') new_ks = build_ks(spin_id) spin = get_spin(spin_id) return render_to_response('build.html', {'ks': new_ks, 'spin': spin})
def build(request): """ Build KS and later Image """ spin_id = request.POST.get('spin_id') # if spin_id is None, then they accidentally skipped to this page if spin_id == None: return HttpResponseRedirect("/") new_ks = build_ks(spin_id) spin = get_spin(spin_id) return render_to_response('build.html', {'ks': new_ks, 'spin': spin})