Ejemplo n.º 1
0
def patchtool_index(request):
    running = is_running('/usr/local/bin/tklpatch')
    if running != '':
        return HttpResponseRedirect('status/')
    baseimages = list_images()
    patches = list_patches()
    return render_to_response('patchtool/index.html',
       {"baseimages": baseimages,
        "patches": patches,
       }, context_instance=RequestContext(request))
Ejemplo n.º 2
0
def patches_index(request):
    patches = list_patches();
    patcheslist = []
    for x in patches:
        filename = '/srv/tklpatch/patches/'+x+'/'+x+'.tar.gz'
        if os.path.isfile(filename):
            lastbuilt = lastupdated(filename)
            patcheslist.append({'name': x, 'lastbuilt': lastbuilt})
        else:
            patcheslist.append({'name':"no consigio "+x})
    return render_to_response("patches/patches.html",{"patcheslist": patcheslist})