Metadata-Version: 2.4
Name: django-admin-contexts
Version: 0.3.0
Summary: Contexts for Django Admin homepage
Project-URL: Homepage, https://github.com/matagus/django-admin-contexts
Project-URL: Issues, https://.github.com/matagus/django-admin-contexts/issues
Project-URL: Repository, https://github.com/matagus/django-admin-contexts
Project-URL: Changelog, https://githib.com/matagus/django-admin-contexts/releases
Project-URL: Pypi, https://pypi.org/project/django-admin-contexts
Author-email: Matias Agustin Mendez <matagus@gmail.com>
License-Expression: BSD-3-Clause
License-File: AUTHORS.md
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.0
Classifier: Framework :: Django :: 4.1
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Django :: 5.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Requires-Dist: django>=4.0
Provides-Extra: dev
Requires-Dist: django-debug-toolbar; extra == 'dev'
Requires-Dist: django-extensions; extra == 'dev'
Requires-Dist: ipython; extra == 'dev'
Requires-Dist: werkzeug; extra == 'dev'
Description-Content-Type: text/markdown

# django-admin-contexts

![Python Compatibility](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue.svg) [![PyPi Version](https://img.shields.io/pypi/v/django-admin-contexts.svg)](https://pypi.python.org/pypi/django-admin-contexts) ![CI badge](https://github.com/matagus/django-admin-contexts/actions/workflows/ci.yml/badge.svg) [![codecov](https://codecov.io/gh/matagus/django-admin-contexts/graph/badge.svg?token=a64SxEDQk0)](https://codecov.io/gh/matagus/django-admin-contexts) [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

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.

![Demo: selecting a context to dsiplay only a subset of models](https://raw.githubusercontent.com/matagus/django-admin-contexts/main/screenshots/demo.gif)


Installation
============

Via `pip` command:

```bash
pip install django-admin-contexts
```

...or you can clone the repo and install it using `pip` too:

```bash
git clone git://github.com/matagus/django-admin-contexts.git
cd django-admin-contexts
pip install -e .
```

then add `django_admin_contexts` to your `settings.py` **before** `django.contrib.admin`:

```python
INSTALLED_APPS = (
    # ...
    "django_admin_contexts",
    # ...
    "django.contrib.admin",
    # ...
)
```

then run the migrations:

```bash
python manage.py migrate
```

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.


Contributing
============

Contributions are welcome! ❤️

Please read [Contributing.md](CONTRIBUTING.md) for detailed instructions on how to help.

Running Tests
-------------

`hatch run test:test` will run the tests in every Python + Django versions combination.

`hatch run test.py3.13-5.2:test` will run them for python 3.13 and Django 5.2. Please see possible combinations using
`hatch env show` ("test" matrix).


License
=======

`django-admin-contexts` is released under an BSD License - see the `LICENSE` file for more information.


Acknowledgements
================

Develop & built using [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
