sideabar fixed in dhjanog
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user