A semantic search engine for source code https://bitshift.benkurtovic.com/
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

42 行
915 B

  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 import languages
  8. # from bitshift.database import Database
  9. # from bitshift.query import parse_query
  10. app = Flask(__name__)
  11. app.config.from_object("bitshift.config")
  12. app_env = app.jinja_env
  13. app_env.line_statement_prefix = "="
  14. app_env.globals.update(assets=assets)
  15. # database = Database()
  16. @app.route("/")
  17. def index():
  18. return render_template("index.html", autocomplete_languages=languages.LANGS)
  19. @app.route("/search/<query>")
  20. def search(query):
  21. # tree = parse_query(query)
  22. # database.search(tree)
  23. pass
  24. @app.route("/about")
  25. def about():
  26. return render_template("about.html")
  27. @app.route("/developers")
  28. def developers():
  29. return render_template("developers.html")
  30. if __name__ == "__main__":
  31. app.run(debug=True)