23 lines
867 B
Python
23 lines
867 B
Python
import os
|
|
|
|
basedir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
|
|
|
class Config:
|
|
SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-secret-key-change-in-production'
|
|
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'postgresql://postgres:password@localhost:5432/classrooms_db'
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
|
API_BASE_URL = os.environ.get('API_BASE_URL') or 'http://localhost:8080/api'
|
|
|
|
# Pagination
|
|
ITEMS_PER_PAGE = 20
|
|
|
|
# Upload settings
|
|
MAX_CONTENT_LENGTH = 16 * 1024 * 1024 # 16MB max file size
|
|
UPLOAD_FOLDER = 'app/static/uploads'
|
|
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}
|
|
|
|
# Internationalization
|
|
LANGUAGES = ['en', 'es']
|
|
BABEL_DEFAULT_LOCALE = 'en'
|
|
BABEL_DEFAULT_TIMEZONE = 'UTC'
|
|
BABEL_TRANSLATION_DIRECTORIES = os.path.join(basedir, 'translations') |