mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-24 11:51:08 -05:00
Add secret management guide, client-side performance monitoring, and search accessibility enhancements
- Introduced a comprehensive Secret Management Guide detailing best practices, secret classification, development setup, production management, rotation procedures, and emergency protocols. - Implemented a client-side performance monitoring script to track various metrics including page load performance, paint metrics, layout shifts, and memory usage. - Enhanced search accessibility with keyboard navigation support for search results, ensuring compliance with WCAG standards and improving user experience.
This commit is contained in:
@@ -2,13 +2,18 @@
|
||||
import os
|
||||
import sys
|
||||
import django
|
||||
from django.conf import settings
|
||||
from django.test.runner import DiscoverRunner
|
||||
import coverage # type: ignore
|
||||
|
||||
|
||||
def setup_django():
|
||||
"""Set up Django test environment"""
|
||||
"""Set up Django test environment.
|
||||
|
||||
Uses config.django.test settings which configures:
|
||||
- PostGIS database for GeoDjango support
|
||||
- In-memory cache for test isolation
|
||||
- Fast password hashing for speed
|
||||
"""
|
||||
# Add the project root directory to Python path
|
||||
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.insert(0, project_root)
|
||||
@@ -16,32 +21,6 @@ def setup_django():
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.django.test")
|
||||
django.setup()
|
||||
|
||||
# Use PostGIS for GeoDjango support
|
||||
settings.DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.contrib.gis.db.backends.postgis",
|
||||
"NAME": "test_thrillwiki",
|
||||
"USER": "postgres",
|
||||
"PASSWORD": "postgres",
|
||||
"HOST": "localhost",
|
||||
"PORT": "5432",
|
||||
"TEST": {
|
||||
"NAME": "test_thrillwiki",
|
||||
},
|
||||
}
|
||||
}
|
||||
settings.DEBUG = False
|
||||
|
||||
# Skip problematic migrations during tests
|
||||
settings.MIGRATION_MODULES = {
|
||||
"parks": None,
|
||||
"operators": None,
|
||||
"property_owners": None,
|
||||
"location": None,
|
||||
"rides": None,
|
||||
"reviews": None,
|
||||
}
|
||||
|
||||
|
||||
class CustomTestRunner(DiscoverRunner):
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user