def projects_index(request): projectlist=[] for name in os.listdir('/srv/tklpatch/projects/'): dirname = os.path.join('/srv/tklpatch/projects/', name) if os.path.isdir(dirname): mtime = lastupdated(dirname) projectlist.append({'name': name, 'mtime': mtime}) return render_to_response('projects/projects.html', {'projectlist': projectlist})
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})