Refactor environment setup and enhance development scripts for ThrillWiki

This commit is contained in:
pacnpal
2025-08-20 11:23:05 -04:00
parent 2304085c32
commit 37a20f83ba
8 changed files with 252 additions and 12 deletions

View File

@@ -94,11 +94,14 @@ for middleware in DEVELOPMENT_MIDDLEWARE:
INTERNAL_IPS = ['127.0.0.1', '::1']
# Silk configuration for development
SILKY_PYTHON_PROFILER = True
SILKY_PYTHON_PROFILER_BINARY = True
SILKY_PYTHON_PROFILER_RESULT_PATH = BASE_DIR / 'profiles'
SILKY_AUTHENTICATION = True
SILKY_AUTHORISATION = True
SILKY_PYTHON_PROFILER = False # Disable profiler to avoid silk_profile installation issues
SILKY_PYTHON_PROFILER_BINARY = False # Disable binary profiler
# SILKY_PYTHON_PROFILER_RESULT_PATH = BASE_DIR / 'profiles' # Not needed when profiler is disabled
SILKY_AUTHENTICATION = True # Require login to access Silk
SILKY_AUTHORISATION = True # Enable authorization
SILKY_MAX_REQUEST_BODY_SIZE = -1 # Don't limit request body size
SILKY_MAX_RESPONSE_BODY_SIZE = 1024 # Limit response body size to 1KB for performance
SILKY_META = True # Record metadata about requests
# NPlusOne configuration
import logging