mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 10:51:09 -05:00
Refactor code structure and remove redundant changes
This commit is contained in:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user