Refactor code structure and remove redundant changes

This commit is contained in:
pacnpal
2025-08-26 13:19:04 -04:00
parent bf7e0c0f40
commit 831be6a2ee
151 changed files with 16260 additions and 9137 deletions

View File

@@ -37,6 +37,10 @@ apps_dir = BASE_DIR / "apps"
if apps_dir.exists() and str(apps_dir) not in sys.path:
sys.path.insert(0, str(apps_dir))
# Add backend directory to sys.path so Django can find the api module
if str(BASE_DIR) not in sys.path:
sys.path.insert(0, str(BASE_DIR))
# Read environment file if it exists
environ.Env.read_env(BASE_DIR / ".env")
@@ -95,11 +99,9 @@ LOCAL_APPS = [
"apps.accounts",
"apps.parks",
"apps.rides",
"apps.api", # New consolidated API app
"api", # Centralized API app (located at backend/api/)
"apps.email_service",
"apps.media.apps.MediaConfig",
"apps.moderation",
"apps.location",
]
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
@@ -313,12 +315,12 @@ SPECTACULAR_SETTINGS = {
],
"SCHEMA_PATH_PREFIX": "/api/",
"DEFAULT_GENERATOR_CLASS": "drf_spectacular.generators.SchemaGenerator",
"DEFAULT_AUTO_SCHEMA": "apps.api.v1.schema.ThrillWikiAutoSchema",
"DEFAULT_AUTO_SCHEMA": "api.v1.schema.ThrillWikiAutoSchema",
"PREPROCESSING_HOOKS": [
"apps.api.v1.schema.custom_preprocessing_hook",
"api.v1.schema.custom_preprocessing_hook",
],
"POSTPROCESSING_HOOKS": [
"apps.api.v1.schema.custom_postprocessing_hook",
"api.v1.schema.custom_postprocessing_hook",
],
"SERVE_PERMISSIONS": ["rest_framework.permissions.AllowAny"],
"SWAGGER_UI_SETTINGS": {