django-admin-home
A tree-navigation sidebar, home dashboard and header user menu for the Django admin.
Compatibility
The package supports Django 3.2 through 6.0 and uses Python 3.10 or newer. The tested combinations follow Django's own Python support policy:
| Django | Python tested by this package |
|---|---|
| 3.2 | 3.10 |
| 4.2 | 3.10 |
| 5.2 | 3.10, 3.12 |
| 6.0 | 3.12, 3.13, 3.14 |
Python 3.15 has no upper bound in this package and requires no incompatible Python syntax or APIs. It can be used as soon as the selected Django release officially supports it; it is not part of the automated matrix until then.
By default, the Django admin's home page is a flat, alphabetical list of every app/model the current user can access, and the built-in sidebar has no favorites or usage-based shortcuts. This package replaces both with:
Features
- A collapsible sidebar, grouped by app, built from the admin's own
get_app_list— so it always respects the current user's permissions. - A "Favorites" section and a star to pin/unpin any app or model (persisted per user).
- A home page with cards for favorites, most-accessed items (tracked per user), and every module, in a responsive grid (with an optional compact "masonry" layout).
- An optional "Pages" group for custom, non-model links (dashboards, API docs, external tools, ...), entirely configured via settings.
- A header user menu: identity, a language switcher (driven by
settings.LANGUAGES), an explicit Auto/Light/Dark theme switcher, and account shortcuts (change password, log out). - A dependency-free, offline SVG icon set (no external font/CDN).
- Defensive by design: any unexpected failure falls back to the native admin behaviour instead of breaking the page.
- Two optional, drop-in extras that need no settings or Python wiring at all — just CSS/JS — because they only touch Django's own native markup: a collapsible changelist filter panel, and a floating horizontal scrollbar for wide results tables (see "Optional extras" below).
Installation
pip install django-admin-home
Add it to INSTALLED_APPS (it ships models, so run migrate afterwards):
INSTALLED_APPS = [
"django_admin_home",
...
"django.contrib.admin",
]
Enable it, once — e.g. in your own app's AppConfig.ready():
from django.apps import AppConfig
class MyAppConfig(AppConfig):
def ready(self):
from django_admin_home import install
install()
Include the bundled CSS/JS in your admin/base_site.html:
{% load static %}
<link rel="stylesheet" href="{% static 'django_admin_home/css/nav.css' %}">
<link rel="stylesheet" href="{% static 'django_admin_home/css/home.css' %}">
<link rel="stylesheet" href="{% static 'django_admin_home/css/user_menu.css' %}">
<script src="{% static 'django_admin_home/js/nav.js' %}" defer></script>
<script src="{% static 'django_admin_home/js/user_menu.js' %}" defer></script>
Run migrations:
python manage.py migrate django_admin_home
Header user menu (optional)
The user menu (identity, language switcher, theme switcher, account shortcuts) needs two context processors and a template include:
TEMPLATES = [{
...,
"OPTIONS": {"context_processors": [
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
...,
"django_admin_home.context_processors.admin_user",
"django_admin_home.context_processors.admin_languages",
]},
}]
{% block usertools %}
{% if has_permission %}
<div id="user-tools">{% include "admin_home/_user_menu.html" %}</div>
{% endif %}
{% endblock %}
The language switcher lists whatever is in settings.LANGUAGES and posts
to Django's own set_language view — make sure
django.middleware.locale.LocaleMiddleware and django.contrib.admin's
i18n URLs are enabled. The theme switcher reuses the Django admin's own
localStorage.theme + data-theme contract, so it stays in sync with the
native toggle (which this menu hides, in favour of the explicit picker).
To add project-specific links to the menu (e.g. an internal tool), override
the template admin_home/_user_menu_extra_actions.html (empty by default).
Optional extras: filter panel and floating scrollbar
Two independent features that need no settings and no Python wiring — they only rewrite Django's own native markup on the changelist page, so just include their CSS/JS:
<link rel="stylesheet" href="{% static 'django_admin_home/css/filter_panel.css' %}">
<link rel="stylesheet" href="{% static 'django_admin_home/css/hscroll.css' %}">
<script src="{% static 'django_admin_home/js/filter_panel.js' %}" defer></script>
<script src="{% static 'django_admin_home/js/hscroll.js' %}" defer></script>
- Filter panel: turns the native
#changelist-filtersidebar into a collapsible panel with a header (funnel icon + title + toggle), matching the main sidebar's look — including dark mode, since it reuses the same--admin-home-nav-*tokens. Collapsed state persists inlocalStorage. - Floating scrollbar: a bar fixed to the bottom of the viewport, synced with a wide results table, so you don't have to scroll all the way down to reach the table's own horizontal scrollbar. Only appears when the table actually overflows and the table's own scrollbar isn't already on screen.
Both use the admin_home/_icon_sprite.html sprite (already included if
you followed the sidebar setup above) and default to English labels
("Filters", "Collapse/expand filters"). To translate them, set
window.ADMIN_HOME_I18N with a <script> block that runs before these
files load:
<script>window.ADMIN_HOME_I18N = Object.assign(window.ADMIN_HOME_I18N || {}, {
filters: "{% trans 'Filters' %}",
toggleFilters: "{% trans 'Collapse/expand filters' %}"
});</script>
Settings (all optional)
# Icon per app/model. Value is a symbol name from the bundled SVG sprite
# (admin_home/_icon_sprite.html) — add your own <symbol> there via a
# template override if you need more icons.
ADMIN_HOME_APP_ICONS = {"buyers": "building", "cards": "card"}
ADMIN_HOME_MODEL_ICONS = {"buyers.buyer": "building"}
# Extra, non-model links shown in a "Pages" group.
ADMIN_HOME_CUSTOM_PAGES = [
{
"key": "page.dashboard",
"name": "Dashboard",
"icon": "gauge",
"url_name": "dashboard_index",
"permission": "account.view_menu_dashboard", # optional
"new_tab": True,
},
]
# How many "most accessed" cards to show on the home page (default 8).
ADMIN_HOME_MAX_MOST_ACCESSED = 8
# Show the "Hello, <name>" welcome banner at the top of the home page
# (default True). Set to False to start the page at the favorites.
ADMIN_HOME_SHOW_WELCOME_BANNER = True
# Native label / sprite icon per language code, for the user menu's
# language switcher. A language missing here still works, with Django's
# own label and the bundled "globe" icon. The package ships no flag
# icons — any name in ADMIN_HOME_LANGUAGE_FLAGS must exist in the sprite,
# which means adding your own <symbol> via a template override of
# admin_home/_icon_sprite.html (see "Overriding the brand/logo" below).
ADMIN_HOME_LANGUAGE_LABELS = {"pt-br": "Português (BR)", "es": "Español"}
ADMIN_HOME_LANGUAGE_FLAGS = {"pt-br": "flag-br", "es": "flag-es"}
Overriding the brand/logo
The sidebar header includes admin_home/_brand.html, which by default just
shows site_header as text. To show your own logo, place a template at
the same path earlier in your project's template resolution (e.g.
templates/admin_home/_brand.html in your project, with APP_DIRS search
order putting your project templates before installed apps).
What this package intentionally does not do
- It does not set
site_header/site_title/index_title— that stays a project-level decision. - It does not touch
AdminSite.has_permission— any extra access rules are the host project's responsibility. - It does not migrate data from a previous, project-specific favorites/access-tracking implementation.
- It does not ship any country flag icons, or a Rosetta/translation-tool link — both are left to the host project via settings/template overrides (see above).
Metadata
Release files for django-admin-home 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_admin_home-0.4.1.tar.gz | 45.1 kB | Without provenance | Details for django_admin_home-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_admin_home-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for django_admin_home-0.4.1-py3-none-any.whl |
Total release size: 92.4 kB
Release files / django_admin_home-0.4.1.tar.gz
| Download URL | django_admin_home-0.4.1.tar.gz |
|---|---|
| Size | 45.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b90b166943fda37d2e6f4459c9787b9a2187d7f94c236149ee96fa4ff38e29cd
|
|
BLAKE2b-256 checksum How to use checksums |
f5aeee29c2c3b78c9d14298ca0f44ed42e686ba3a4e36075da3ee318b94dd8ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / django_admin_home-0.4.1-py3-none-any.whl
| Download URL | django_admin_home-0.4.1-py3-none-any.whl |
|---|---|
| Size | 47.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e38ce0f848fedd1908e5d5b71c4f0f4f9aab0bdb22a6962c196fd3a7b12bf23c
|
|
BLAKE2b-256 checksum How to use checksums |
2feefb7a3df2aca390077f5e39a3b53feb26fc9b526dfc2c55236564361c8d83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for django-admin-home 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.