For now, it only adds nested inlines (see Django#9025). But I also plan to add other features I developed for my own projects.
There is no unit tests for the moment, so use at your own risks.
It would be extremely useful if someone took time to write Selenium tests.
Usage
It’s only compatible with Django 1.7.2 to 1.7.8 (I tested) and probably 1.8. Don’t even try with previous versions, django-super-inlines relies on changes that happened between 1.6 and 1.7.2.
For design reasons, you can’t nest inlines inside tabular inlines, only inside stacked inlines.
pip install django-super-inlines
Add 'super_inlines', to INSTALLED_APPS before 'django.contrib.admin',
If you use django-grappelli, add 'super_inlines.grappelli_integration', to INSTALLED_APPS before 'grappelli', and 'super_inlines',
Inherit from SuperModelAdmin instead of ModelAdmin, SuperInlineModelAdmin instead of InlineModelAdmin, and use the class attribute inlines in inlines as you do in model admins
Example usage:
from django.contrib.admin import TabularInline, StackedInline, site
from super_inlines.admin import SuperInlineModelAdmin, SuperModelAdmin
from .models import *
class RoomInlineAdmin(SuperInlineModelAdmin, TabularInline):
model = Room
class HouseInlineAdmin(SuperInlineModelAdmin, StackedInline):
model = House
inlines = (RoomInlineAdmin,)
class OwnerAdmin(SuperModelAdmin):
inlines = (HouseInlineAdmin,)
site.register(Owner, OwnerAdmin)
Release files for django-super-inlines 0.2.2
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-super-inlines-0.2.2.tar.gz | 22.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_super_inlines-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.4 kB
Release files / django-super-inlines-0.2.2.tar.gz
| Download URL | django-super-inlines-0.2.2.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc2ee07efd28776d1295b3884f3c79e2efe8288115afc3e9dfae3c8de87378a6
|
|
BLAKE2b-256 checksum How to use checksums |
a9a6ddfe943dea98eaab2dbb21060b231a7ba75139e7471da639f8755e6c9889
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / django_super_inlines-0.2.2-py3-none-any.whl
| Download URL | django_super_inlines-0.2.2-py3-none-any.whl |
|---|---|
| Size | 28.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
587a9391840cac346e6903b66d3a9fc7222cb5e22190ff2522cc7981a4a17adc
|
|
BLAKE2b-256 checksum How to use checksums |
9186da6281c93bf91639e882d52a5bd32714d8ff63448c6485a2dfe156cc85b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|