When building large Django applications, one problem slowly becomes painful:
sidebar management
Enter fullscreen mode
Exit fullscreen mode
Especially in modular systems like:
HRMS
CRM
ERP
Admin panels
Multi-app dashboards
At first, updating the sidebar feels simple.
But once your project grows to:
10+ apps
multiple contributors
role-based permissions
dynamic navigation
HTMX interactions
your sidebar.html quickly becomes a maintenance nightmare.
The Problem I Faced
In my Django CRM project, every new app required updating:
sidebar.html sub_sidebar.html
Enter fullscreen mode
Exit fullscreen mode
Example:
<li> <a href= "/accounts/" > Accounts </a> </li>
<li> <a href= "/contacts/" > Contacts </a> </li>
Enter fullscreen mode
Exit fullscreen mode
This caused several problems:
Every contributor had to modify core sidebar templates
Frequent Git merge conflicts
Sidebar logic became centralized and difficult to maintain
Permission handling became repetitive
Adding new apps required…