邓淳远、崔鹏宇、翁思扬组云计算期末项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
714 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. import sys
  2. sys.path.append('..')
  3. from flask import request, Flask, jsonify
  4. from APP.view.auth import bp_auth
  5. from APP.view.block import bp_block
  6. from APP.view.start import bp_start
  7. from APP.view.collection import bp_collection
  8. from APP.view.database import init_db
  9. class CustomFlask(Flask):
  10. jinja_options = Flask.jinja_options.copy()
  11. jinja_options.update(dict(
  12. variable_start_string='%%', # Default is '{{', I'm changing this because Vue.js uses '{{' / '}}'
  13. variable_end_string='%%',
  14. ))
  15. app = CustomFlask(__name__)
  16. app.register_blueprint(bp_auth)
  17. app.register_blueprint(bp_start)
  18. app.register_blueprint(bp_block)
  19. app.register_blueprint(bp_collection)
  20. init_db()
  21. app.run(debug=True)