Install & Compatibility
Where this runs
tested against v0.4.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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
NestedModelAdmin
✓ from nested_inline.admin import NestedModelAdmin
✗ from nested_inline.admin import NestedModelAdmin
Define nested models with foreign keys and register admin with NestedModelAdmin to enable recursive inline editing.
# models.py
from django.db import models
class Parent(models.Model):
name = models.CharField(max_length=100)
class Child(models.Model):
parent = models.ForeignKey(Parent, on_delete=models.CASCADE, related_name='children')
name = models.CharField(max_length=100)
class Grandchild(models.Model):
child = models.ForeignKey(Child, on_delete=models.CASCADE, related_name='grandchildren')
name = models.CharField(max_length=100)
# admin.py
from django.contrib import admin
from nested_inline.admin import NestedModelAdmin, NestedTabularInline, NestedStackedInline
from .models import Parent, Child, Grandchild
class GrandchildInline(NestedTabularInline):
model = Grandchild
extra = 1
class ChildInline(NestedTabularInline):
model = Child
extra = 1
inlines = [GrandchildInline]
class ParentAdmin(NestedModelAdmin):
inlines = [ChildInline]
admin.site.register(Parent, ParentAdmin)
Upgrade
Version history
0.4.6latest on PyPI · released Mar 14, 2023
Audit
Dependencies
DjangorequiredCore dependency for admin and ORM