django-nested-inline
Nested inline support for Django admin
Most of the code from this package is from [https://code.djangoproject.com/ticket/9025](https://code.djangoproject.com/ticket/9025)
Github
[https://github.com/s-block/django-nested-inline](https://github.com/s-block/django-nested-inline)
Installation
pip install django-nested-inline
Usage
Add nested_inline to INSTALLED_APPS
models.py
from django.db import models
- class TopLevel(models.Model):
name = models.CharField(max_length=200)
- class LevelOne(models.Model):
name = models.CharField(max_length=200) level = models.ForeignKey(‘TopLevel’)
- class LevelTwo(models.Model):
name = models.CharField(max_length=200) level = models.ForeignKey(‘LevelOne’)
- class LevelThree(models.Model):
name = models.CharField(max_length=200) level = models.ForeignKey(‘LevelTwo’)
admin.py
from django.contrib import admin from nested_inline.admin import NestedStackedInline, NestedModelAdmin from example.models import *
- class LevelThreeInline(NestedStackedInline):
model = LevelThree extra = 1 fk_name = ‘level’
- class LevelTwoInline(NestedStackedInline):
model = LevelTwo extra = 1 fk_name = ‘level’ inlines = [LevelThreeInline]
- class LevelOneInline(NestedStackedInline):
model = LevelOne extra = 1 fk_name = ‘level’ inlines = [LevelTwoInline]
- class TopLevelAdmin(NestedModelAdmin):
model = TopLevel inlines = [LevelOneInline]
admin.site.register(TopLevel, TopLevelAdmin)
Changelist
0.3.7 - added support for django 1.10, fix unique fieldset id
0.3.6 - added support for django 1.9
0.3.5 - Removed deprecated methods and updated for Django 1.8/1.9
0.3.4 - added licence and updated for python 3
0.3.3 - fixed bug where inlines without inlines would cause an error
Metadata
Release files for django-nested-inline-py3 0.3.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-nested-inline-py3-0.3.8.tar.gz | 16.2 kB | Without provenance | Details for django-nested-inline-py3-0.3.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_nested_inline_py3-0.3.8-py3-none-any.whl | Python 3 | none | any | Details for django_nested_inline_py3-0.3.8-py3-none-any.whl |
Total release size: 36.9 kB
Release files / django-nested-inline-py3-0.3.8.tar.gz
| Download URL | django-nested-inline-py3-0.3.8.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
565a677694bfdfe2f6d312cea8d007e3e38fda296f4946d5abd00a06768d47fa
|
|
BLAKE2b-256 checksum How to use checksums |
5319cbdfc0a2abff5e4ca98774a1c252db4c8488e66bac14a772fbcdbde9b255
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Release files / django_nested_inline_py3-0.3.8-py3-none-any.whl
| Download URL | django_nested_inline_py3-0.3.8-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce183eb991508be2250b0ec4c2efc2b2b40513735595df2bf0f8bc578fb93c84
|
|
BLAKE2b-256 checksum How to use checksums |
b143cb046d98570dd69aece84ed31c6e2d583584e6790cf478e852e95ddea8b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for django-nested-inline-py3 0.3.8
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.