Skip to main content

Contexts for Django Admin homepage

Project description

django-admin-contexts

Python Compatibility PyPi Version CI badge codecov License

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

Installation

Via pip command:

pip install django-admin-contexts

...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 .

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

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

then run the migrations:

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 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 linting - Ruff code style - black

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_admin_contexts-0.3.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_admin_contexts-0.3.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file django_admin_contexts-0.3.0.tar.gz.

File metadata

  • Download URL: django_admin_contexts-0.3.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_admin_contexts-0.3.0.tar.gz
Algorithm Hash digest
SHA256 afd62f6b0aaf95b8321b809a126db0cef489406356b879bb9da8238629d02ff8
MD5 3a81355ebadaa880c520b30e896fc5e1
BLAKE2b-256 10e8badb9beb1392dd804c58a8edca3172c769fc23a4f2bd34a73180345a6345

See more details on using hashes here.

File details

Details for the file django_admin_contexts-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_contexts-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2424a6663f2637977b83e3a56914a5465af2815d13803e0cff9a89397f148775
MD5 8af8ffc07e0c7c8a99890b753ff1bc16
BLAKE2b-256 e88b40979c12cea505d89ae8ea36875e56c355ecfa1dfc3ca2f78f7508ae30f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page