django-admin-home
A tree-navigation sidebar plus a favorites/most-accessed home dashboard for the Django admin.
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 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.
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' %}">
<script src="{% static 'django_admin_home/js/nav.js' %}" defer></script>
Run migrations:
python manage.py migrate django_admin_home
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
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_admin_home-0.1.0.tar.gz.
File metadata
- Download URL: django_admin_home-0.1.0.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bed89ee4f296050fbf7c4b731f2d251caf2c7b7dba1253b7ef071d03d87fa3f6
|
|
| MD5 |
99d923849ec062ead48012f7f54ca6a1
|
|
| BLAKE2b-256 |
5dbdc9b089577dec1a446d4e1ef92861f5aa9a536278ee5cbd73e47090d35ef1
|
File details
Details for the file django_admin_home-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_admin_home-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22603c20b4891de28d68d50827f9510a21b79827e38d4d146051a8ea270240c7
|
|
| MD5 |
52915e54762b1a24307d39832de70d59
|
|
| BLAKE2b-256 |
64b488526053bd8edd86e6578a44cead4e2cfdd1a483672354ea307fcd290f6d
|