Django Tabbed Model Admin
Give each tab its own Django ModelAdmin, form, validation, and save operation,
while editing the same model instance. Extracted from Vortexia's existing tabbed
admin implementation; this is page navigation, not JavaScript fieldset hiding.
Installation
pip install django-tabbed-model-admin
Place the app before django.contrib.admin so Django finds its template:
INSTALLED_APPS = [
"tabbed_model_admin.apps.TabbedModelAdminConfig",
"django.contrib.admin",
# ...
]
Run collectstatic as usual for deployment. No database migrations are needed.
Usage
from django.contrib import admin
from tabbed_model_admin import TabbedModelAdmin
from .models import Event
class SettingsTab(admin.ModelAdmin):
fields = ("name", "date")
class AppearanceTab(admin.ModelAdmin):
fields = ("colour",)
@admin.register(Event)
class EventAdmin(TabbedModelAdmin):
list_display = ("name", "date")
model_admins = (
("Settings", SettingsTab),
("Appearance", AppearanceTab),
)
Do not separately register the tab classes. All tab classes edit the parent model.
The standard add page uses the first tab and does not show navigation until an
object exists. The standard change URL redirects to the first tab. Each tab has
its own URL, <object_id>/change/<slugified-tab-name>/, named
admin:<app_label>_<model_name>_change_<slugified-tab-name>.
Provide at least one tab and unique, nonempty slugified tab names. The first tab must support creating the object, including its required fields or defaults. Each tab saves only its own form and inlines. Save changes before navigating away; there is no automatic saving or unsaved-change prompt.
Put shared permission checks, queryset restrictions, and save hooks in a common
base class inherited by every tab. Options and overrides on the outer admin
control its own views and are not automatically inherited by its tab admins.
The initial release preserves the default admin URL namespace.
Templates and styling
The package extends admin/change_form.html and renders tabs in form_top.
Project template overrides should preserve {{ block.super }} in that block.
CSS ships at tabbed_model_admin/css/tabbed_model_admin.css; customize the
--admin-tabs-active-color, --admin-tabs-inactive-color, and
--admin-tabs-border-color CSS variables to match your admin theme.
Development
uv venv --python 3.12
uv pip install -e '.[test]'
uv run --no-project pytest
uv build
CI tests Django 4.2, 5.2, 6.0, and 6.1. Releases use GitHub Actions trusted publishing to PyPI from version tags after tests pass.
Metadata
Release files for django-tabbed-model-admin 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_tabbed_model_admin-0.1.0.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_tabbed_model_admin-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.8 kB
Release files / django_tabbed_model_admin-0.1.0.tar.gz
| Download URL | django_tabbed_model_admin-0.1.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
381785a3447fc6cded6af90eef72d6d009dec4a38aa58a3971d3238d7b23ddea
|
|
BLAKE2b-256 checksum How to use checksums |
d0f1734957330bcb257dfe024e1d36124eebcb3342e50cc12644f5da2baf064f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / django_tabbed_model_admin-0.1.0-py3-none-any.whl
| Download URL | django_tabbed_model_admin-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
390bf67cf53fb0b9b290cec827748feecf7a6ae5c819a31aead1497e45bc9842
|
|
BLAKE2b-256 checksum How to use checksums |
40e400ad98738226493f6bf89c28799f68be6f5c622c7cd4a44603c1c149f5a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency log