A corporation manager and dashboard for EVE Online
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

35 satır
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)