A corporation manager and dashboard for EVE Online
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.
 
 
 
 
 

35 lines
765 B

  1. #! /usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. from pathlib import Path
  4. from flask import Flask, g
  5. from flask_mako import MakoTemplates, render_template
  6. from calefaction import __version__ as version
  7. from calefaction.config import Config
  8. from calefaction.eve import EVE
  9. from calefaction.util import catch_errors, set_up_hash_versioning
  10. basepath = Path(__file__).resolve().parent
  11. app = Flask(__name__)
  12. config = Config(basepath / "config")
  13. eve = EVE()
  14. MakoTemplates(app)
  15. set_up_hash_versioning(app)
  16. @app.before_request
  17. def prepare_request():
  18. g.config = config
  19. g.eve = eve
  20. g.version = version
  21. @app.route("/")
  22. @catch_errors(app)
  23. def index():
  24. return render_template("landing.mako")
  25. if __name__ == "__main__":
  26. app.run(debug=True, port=8080)