def view_server_image(server_id): server = Server.objects(server_id=server_id).first() if server is None: abort(404) image = StringIO.StringIO(server.server_image.read()) image.seek(0) return send_file(image, mimetype='image/png')
def view_servers(): servers = Server.objects() return render_template('servers_view_servers.html', servers=servers, title="Servers")
def inject_servers(): return dict(servers=Server.objects())