from flask import Flask,render_template from py2neo import Graph graph = Graph("bolt://localhost:11008", auth=("neo4j", "d1"))
app = Flask(name)
@app.route('/search', methods=['GET', 'POST']) def search(): if request.method enter code here== "POST": graph = Graph("bolt://localhost:11008", auth=("neo4j", "d1")) graph.run("MATCH (a:Person)RETURN a.name, a.born LIMIT 2").to_table() return render_template("search.html") if name == "main": app.run()
Aucun commentaire:
Enregistrer un commentaire