Registry / web-framework / django-adminplus

django-adminplus

JSON →
library0.6pypypi✓ verified 23d ago

AdminPlus is a Django admin panel extension that allows you to add custom views not tied to models, extending the built-in admin without replacing it entirely. It supports Django versions 3.0+ and Python 3.7+. While the last official PyPI release was in 2016 (v0.6), the project is actively maintained with CI/CD testing against recent Django and Python versions.

pip install django-adminplus
INSTALL
IMPORT
SIG · DJANGO-ADMINPLUS
D
django-adminplus
web-frameworkpythonv0.6
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

VERSION
from adminplus import VERSION
from adminplus import AdminSitePlus

To integrate `django-adminplus`, you need to modify your project's `settings.py` and `urls.py`. In `settings.py`, replace `'django.contrib.admin'` with `'django.contrib.admin.apps.SimpleAdminConfig'` and add `'adminplus'` to `INSTALLED_APPS`. In `urls.py`, replace `django.contrib.admin.site` with an instance of `AdminSitePlus` before calling `admin.autodiscover()`. Then, you can register any callable view using `admin.site.register_view`.

import os import django from django.conf import settings from django.urls import path, include from django.contrib import admin from adminplus.sites import AdminSitePlus from django.http import HttpResponse settings.configure( DEBUG=True, SECRET_KEY=os.environ.get('DJANGO_SECRET_KEY', 'insecure-dev-key'), ROOT_URLCONF=__name__, INSTALLED_APPS=[ 'django.contrib.admin.apps.SimpleAdminConfig', # Replace default admin config 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'adminplus', ], TEMPLATES=[ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ], MIDDLEWARE_CLASSES=[ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ], DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, STATIC_URL='/static/', ) django.setup() # 1. Replace the default admin.site with AdminSitePlus admin.site = AdminSitePlus() admin.autodiscover() # 2. Define your custom view def my_custom_admin_view(request): return HttpResponse("Hello from a custom admin view!") # 3. Register the custom view admin.site.register_view('my-path', view=my_custom_admin_view, name='My Custom View') # Include the admin URLs urlpatterns = [ path('admin/', admin.site.urls), ] if __name__ == '__main__': # This block is for demonstration only and assumes a Django project setup # In a real project, you would run `python manage.py runserver` print("Django Admin Plus quickstart configured.") print("To run, you'd typically have this in your project's urls.py and settings.py.") print("Access custom view at: /admin/my-path/")
Debug
Known issues
breakingReplacing `django.contrib.admin.site` is mandatory for `django-adminplus` to function. If you have other packages or custom code that relies on directly manipulating `django.contrib.admin.site` after it's been instantiated, this replacement might cause conflicts or unexpected behavior.
fix
Ensure `admin.site = AdminSitePlus()` is called early in your `urls.py` (before `admin.autodiscover()`) and test thoroughly. If other apps are affected, consider their compatibility with this change.
affects: All versions
gotchaFailure to correctly configure `INSTALLED_APPS` by replacing `'django.contrib.admin'` with `'django.contrib.admin.apps.SimpleAdminConfig'` and including `'adminplus'` can lead to custom views not appearing or the default Django admin overriding `django-adminplus` functionality.
fix
In your `settings.py`, ensure `INSTALLED_APPS` contains `'django.contrib.admin.apps.SimpleAdminConfig'` and `'adminplus'` in the correct order as shown in the quickstart example.
affects: All versions
gotchaWhile `django-adminplus` version 0.6 is officially old (2016), its GitHub repository shows active CI testing against recent Django (3.2, 4.x, 5.0) and Python (3.8-3.12) versions. However, significant future changes in Django's internal admin structure could introduce compatibility issues not yet reflected in a new release.
fix
Monitor the `django-adminplus` GitHub repository for updates and test thoroughly when upgrading to new major Django versions. Be prepared to contribute patches or temporarily freeze Django versions if critical incompatibilities arise.
affects: Potentially future Django major versions (e.g., Django 6.x)
Upgrade
Version history
0.6latest on PyPI · released Dec 5, 2023
Audit
Dependencies
DjangorequiredCore web framework dependency; requires Django 3.0+.
Agent activity
25 hits · last 30 days
node
24
Resources
django-adminplus — pip install django-adminplus · libregistry