Getting started with django-admin-contexts¶
Display only a set of apps and models in the Django Admin homepage, based on the chosen context. This is useful when you have a lot of apps and models and you want to focus on a specific set of them.

Installation¶
Via pip command:
...or you can clone the repo and install it using pip too:
git clone git://github.com/matagus/django-admin-contexts.git
cd django-admin-contexts
pip install -e .
Quick Start¶
Add django_admin_contexts to your INSTALLED_APPS in settings.py before django.contrib.admin:
Then run the migrations:
Usage¶
Browse to the Django Admin and create some contexts in the "Django Admin Contexts" section, associating them with one or more models.
Then, you can see the contexts in the Django Admin homepage.
Running Tests¶
Prerequisites: Install Hatch if not already installed: pip install hatch
List available test environments:
Run all tests (all Python + Django combinations):
Run tests for specific Python/Django version:
hatch run test.py3.14-5.2:test # Python 3.14 + Django 5.2
hatch run test.py3.12-5.1:test # Python 3.12 + Django 5.1
Run specific test file:
Coverage:
Troubleshooting: If you encounter environment issues, clean and rebuild: hatch env prune