mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 09:31:13 -05:00
Settings Configuration: - Split settings into base.py, local.py, production.py - Configured all 60+ installed packages - Set up PostgreSQL, Redis, Celery, Channels - Configured caching, sessions, logging - Added security settings for production Core Models (apps/core/models.py): - BaseModel: UUID primary key + timestamps + lifecycle hooks - VersionedModel: Automatic version tracking with DirtyFieldsMixin - Country, Subdivision, Locality: Location reference data - DatePrecisionMixin: Track date precision (year/month/day) - SoftDeleteMixin: Soft-delete functionality - ActiveManager & AllObjectsManager: Query managers User Models (apps/users/models.py): - Custom User model with UUID, email-based auth - OAuth support (Google, Discord) - MFA support fields - Ban/unban functionality - UserRole: Role-based permissions (user/moderator/admin) - UserProfile: Extended user info and preferences App Structure: - Created 7 Django apps with proper configs - Set up migrations for core and users apps - All migrations applied successfully to SQLite Testing: - Django check passes with only 1 warning (static dir) - Database migrations successful - Ready for entity models (Park, Ride, Company) Next: Implement entity models for parks, rides, companies
18 lines
480 B
Python
18 lines
480 B
Python
"""
|
|
Django settings package.
|
|
Automatically loads the correct settings based on DJANGO_SETTINGS_MODULE environment variable.
|
|
"""
|
|
|
|
import os
|
|
|
|
# Determine which settings to use
|
|
settings_module = os.getenv('DJANGO_SETTINGS_MODULE', 'config.settings.local')
|
|
|
|
if settings_module == 'config.settings.production':
|
|
from .production import *
|
|
elif settings_module == 'config.settings.local':
|
|
from .local import *
|
|
else:
|
|
# Default to local for development
|
|
from .local import *
|