def show(name): project = Project.get(name=name) if not project: return "No", 404 (project._field('status')).locked = True (project._field('rev')).locked = True status = rstatus_name(name) return render_template('project_show.html', project=project, status=status)
def projects(): plist = Project.all() status_dict = rstatus() for p in plist: # not uwsgi instances for static # so no alive checks if p.template=='static': continue p._alive = ('app-%s' % p.name) in status_dict if p._alive: p._stats = rstatus_name(p.name) if not p._stats: p._alive = False else: p._stats = None if not p._alive and p.status=='ok': p.status='fail' return render_template('projects.html', project_list=plist, )