__init__.py 518 B

123456789101112131415161718192021222324252627
  1. """
  2. Initialize the modules needed for the website
  3. """
  4. import os
  5. from flask import Flask
  6. from dotenv import load_dotenv
  7. from flask_apscheduler import APScheduler
  8. load_dotenv()
  9. class Config():
  10. """Config settings for the application"""
  11. SECRET_KEY = os.environ["SECRET_KEY"]
  12. SEND_FILE_MAX_AGE_DEFAULT = 1296000
  13. app = Flask(__name__)
  14. app.config.from_object(Config())
  15. app.jinja_env.lstrip_blocks = True
  16. app.jinja_env.trim_blocks = True
  17. scheduler = APScheduler()
  18. scheduler.init_app(app)
  19. scheduler.start()