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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user