mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-24 13:51:09 -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:
@@ -9,7 +9,7 @@ import sys
|
||||
import django
|
||||
|
||||
# Setup Django
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "thrillwiki.settings")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.django.test")
|
||||
django.setup()
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test script for the manual trending content calculation trigger endpoint.
|
||||
|
||||
Environment Variables:
|
||||
TEST_ADMIN_USERNAME: Admin username (default: "admin")
|
||||
TEST_ADMIN_PASSWORD: Admin password (required)
|
||||
|
||||
Usage:
|
||||
TEST_ADMIN_PASSWORD=your_password python tests/test_manual_trigger.py
|
||||
"""
|
||||
|
||||
import os
|
||||
import requests
|
||||
import json
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
# Configuration
|
||||
BASE_URL = "http://localhost:8000"
|
||||
ADMIN_USERNAME = "admin"
|
||||
ADMIN_PASSWORD = "admin" # We'll need to check what the password is
|
||||
BASE_URL = os.getenv("TEST_BASE_URL", "http://localhost:8000")
|
||||
ADMIN_USERNAME = os.getenv("TEST_ADMIN_USERNAME", "admin")
|
||||
ADMIN_PASSWORD = os.getenv("TEST_ADMIN_PASSWORD")
|
||||
|
||||
|
||||
def login_and_get_token():
|
||||
"""Login and get authentication token."""
|
||||
if not ADMIN_PASSWORD:
|
||||
print("❌ Error: TEST_ADMIN_PASSWORD environment variable not set")
|
||||
print("Usage: TEST_ADMIN_PASSWORD=your_password python tests/test_manual_trigger.py")
|
||||
return None
|
||||
|
||||
login_url = f"{BASE_URL}/api/v1/auth/login/"
|
||||
|
||||
login_data = {
|
||||
|
||||
@@ -7,7 +7,7 @@ import os
|
||||
import django
|
||||
|
||||
# Setup Django
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "thrillwiki.settings")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.django.test")
|
||||
django.setup()
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ if PROJECT_ROOT not in sys.path:
|
||||
sys.path.insert(0, PROJECT_ROOT)
|
||||
|
||||
# Setup Django before importing project modules that depend on settings.
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "thrillwiki.settings")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.django.test")
|
||||
django.setup()
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ if PROJECT_ROOT not in sys.path:
|
||||
sys.path.insert(0, PROJECT_ROOT)
|
||||
|
||||
# Setup Django environment before importing app modules that depend on settings.
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "thrillwiki.settings")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.django.test")
|
||||
django.setup()
|
||||
|
||||
# Now import project modules
|
||||
|
||||
Reference in New Issue
Block a user