This commit is contained in:
2025-08-07 18:18:36 -04:00
parent 8df728530e
commit 918fc91604
28 changed files with 1127 additions and 243 deletions

40
app/config.py Normal file
View File

@@ -0,0 +1,40 @@
"""
Configuration settings for the application
"""
import os
class Config:
"""Base configuration class"""
# Flask settings
SECRET_KEY = os.environ.get('SECRET_KEY') or os.urandom(24)
# Upload settings
UPLOAD_FOLDER = os.environ.get('UPLOAD_FOLDER') or 'app/static/uploads'
MAX_CONTENT_LENGTH = 16 * 1024 * 1024 # 16MB max file size
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}
# Authentication settings
ADMIN_USERNAME = os.environ.get('ADMIN_USERNAME') or 'admin'
ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD') or 'password123'
# Database settings
DATABASE_PATH = os.environ.get('DATABASE_PATH') or 'pet_pictures.db'
class DevelopmentConfig(Config):
"""Development configuration"""
DEBUG = True
class ProductionConfig(Config):
"""Production configuration"""
DEBUG = False
class TestingConfig(Config):
"""Testing configuration"""
TESTING = True
DATABASE_PATH = ':memory:'