A semantic search engine for source code https://bitshift.benkurtovic.com/
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

app.py 844 B

10 år sedan
10 år sedan
12345678910111213141516171819202122232425262728293031323334353637383940
  1. """
  2. Module to contain all the project's Flask server plumbing.
  3. """
  4. from flask import Flask
  5. from flask import render_template, session
  6. from bitshift import assets
  7. # from bitshift.database import Database
  8. # from bitshift.query import parse_query
  9. app = Flask(__name__)
  10. app.config.from_object("bitshift.config")
  11. app_env = app.jinja_env
  12. app_env.line_statement_prefix = "="
  13. app_env.globals.update(assets=assets)
  14. # database = Database()
  15. @app.route("/")
  16. def index():
  17. return render_template("index.html")
  18. @app.route("/search/<query>")
  19. def search(query):
  20. # tree = parse_query(query)
  21. # database.search(tree)
  22. pass
  23. @app.route("/about")
  24. def about():
  25. return render_template("about.html")
  26. @app.route("/developers")
  27. def developers():
  28. return render_template("developers.html")
  29. if __name__ == "__main__":
  30. app.run(debug=True)