sideabar fixed in dhjanog

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-14 23:43:10 +00:00
parent 78f71558ed
commit aa48a55504
21 changed files with 703 additions and 71 deletions

View File

@@ -1,10 +1,21 @@
# Architecture Knowledge Base
**Last Updated:** December 9, 2025
**Last Updated:** December 14, 2025
**Purpose:** Critical architectural patterns, common issues, and solutions reference
---
## 🔥 CRITICAL FIXES - December 9, 2025
## 🔥 CRITICAL FIXES - December 2025
### PERMANENT FIX: Django Admin Custom Sidebar Not Showing on Subpages
**ROOT CAUSE**: Django's `ModelAdmin` view methods (`changelist_view`, `change_view`, etc.) do not call `AdminSite.each_context()`, so custom sidebar logic defined in `site.py` was bypassed on model list/detail/edit pages.
**SOLUTION IMPLEMENTED**:
1. ✅ Created `Igny8ModelAdmin` base class extending `UnfoldModelAdmin`
2. ✅ Overrides all view methods to inject `extra_context` with custom sidebar
3. ✅ Applied to 46+ admin classes across all modules
4. ✅ Sidebar now consistent on homepage, app index, and ALL model pages
**Files Modified**: `backend/igny8_core/admin/base.py`, all `*/admin.py` files
### PERMANENT FIX: User Swapping / Random Logout Issue
**ROOT CAUSE**: Django's database-backed sessions with in-memory user caching caused cross-request contamination at the process level.