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.

33 lines
668B

  1. from flask import Blueprint,render_template
  2. from modules.core.core import cbpi
  3. react = Blueprint('ui', __name__, template_folder='templates', static_folder='static')
  4. @cbpi.addon.core.initializer(order=10)
  5. def init(cbpi):
  6. cbpi._app.register_blueprint(react, url_prefix='/ui')
  7. @react.route('/', methods=["GET"])
  8. def index():
  9. #return react.send_static_file("index.html")
  10. js_files = []
  11. for key, value in cbpi.cache["js"].iteritems():
  12. js_files.append(value)
  13. print js_files
  14. return render_template('index.html', js_files=js_files)
  15. @cbpi._app.errorhandler(404)
  16. def page_not_found(e):
  17. return render_template('404.html'), 404