import os

basedir = os.path.abspath(os.path.dirname(__file__))

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
    OAUTHLIB_INSECURE_TRANSPORT = True  # Only for testing on localhost
    SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
        'sqlite:///' + os.path.join(basedir, 'app.db')
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    CELERY_BROKER_URL = 'redis://localhost:6379/0'
    CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
    MAIL_SERVER = 'smtp.gmail.com'  # Your SMTP server
    MAIL_PORT = 587  # SMTP port (e.g., 587 for TLS)
    MAIL_USE_TLS = True  # Use TLS
    MAIL_USE_SSL = False  # Use SSL (alternatively to TLS)
    MAIL_USERNAME = 'jake.edwards@oakencloud.com'  # Your email username
    MAIL_PASSWORD = 'yfuw woqs ewwv bgfo'  # Your email password
    MAIL_DEFAULT_SENDER = 'no_reply@oakencloud.com'  # Default sender email
    CACHE_TYPE = 'redis'
    CACHE_REDIS_HOST = 'localhost'
    CACHE_REDIS_PORT = 6379
    CACHE_REDIS_DB = 0
    CACHE_REDIS_URL = 'redis://localhost:6379/0'
