Skip to main content

Recursive nesting of inline forms for Django Admin

Project description

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/soex0101/django-nested-inline-bug-fixed](https://github.com/soex0101/django-nested-inline-bug-fixed) Forked from [https://github.com/s-block/django-nested-inline](https://github.com/s-block/django-nested-inline)

Installation

pip install django-nested-inline-bug-fixed

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.4.4 - Add formset:added and formset:removed events (#97)

0.4.3 - Update media so it expects to find jquery in the right place. (#75)

0.4.2 - Fix assets

0.4.1 - Fix permission checks

0.4.0 - Added support for Django 3.0

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-nested-inline-bug-fixed-0.4.4.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file django-nested-inline-bug-fixed-0.4.4.tar.gz.

File metadata

  • Download URL: django-nested-inline-bug-fixed-0.4.4.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.4

File hashes

Hashes for django-nested-inline-bug-fixed-0.4.4.tar.gz
Algorithm Hash digest
SHA256 262004fcb868bafcd26d62217be61470cfe59348b57b801e4dbba41c76df24fc
MD5 5e353db1070f3e03b69a31b3a90a803a
BLAKE2b-256 245552e6b7aa803bd2644ce39d316201579c8740cc8e2c830f206e110825fd59

See more details on using hashes here.

File details

Details for the file django_nested_inline_bug_fixed-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: django_nested_inline_bug_fixed-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.4

File hashes

Hashes for django_nested_inline_bug_fixed-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 221024aea7bf8412f91522a7d8968dd0069b0337319e3769144ab70da7c0fd1c
MD5 92ea15c6eaa3c8c46356db09a3970c0f
BLAKE2b-256 0b72b109e9759df675ea6666115e00cfd7270b832f63144a88fa345e5acde390

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page