Skip to main content

Fieldsets with inlines

Mix inlines and fieldsets in any order in Django admin.

What is it?

Django administration has nice feature to render related models as inlines under the fieldsets out of the box. Unfortunately there is no easy way to render inlines between fieldsets.

But when the size of the model becomes bigger, ordering of fieldsets and related inlines becomes critical for the usability.

This package makes it easy to mix fieldsets and inlines in any order you want with minimal changes required to your existing code.

Requirements

  • Python: 3.4+
  • Django: 2.0+

Installation

pip install django-fieldsets-with-inlines

Add fieldsets_with_inlines to your INSTALLED_APPS Django settings.py:

INSTALLED_APPS = [
    ...
    'fieldsets_with_inlines',
    ...
]

Usage

In your admin.py import FieldsetsInlineMixin, rename fieldsets property to fieldsets_with_inlines and list inlines right between your fieldsets. You could also remove inlines property:

from fieldsets_with_inlines import FieldsetsInlineMixin

...

class TestAdmin(FieldsetsInlineMixin, admin.ModelAdmin):
    fieldsets_with_inlines = [
        ('Objekt', {
            'fields': [
                ('ID_RNO', 'id', 'kljuc', 'slug'),
                'naziv',
                'kategorija']}),
        LastnistvoInline,
        ('Kontaktni podatki', {
            'fields': [
                ('kontaktna_oseba', 'email', 'poslji_obvestila')]}),
        KontaktInline,
        ('Dostop', {
            'fields': [
                'users',
                ('cas_vpisa', 'zadnja_sprememba', 'cas_zadnje_posodobitve')]}),
        OdjavaInline
    ]

Metadata

Release files for django-fieldsets-with-inlines 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-fieldsets-with-inlines 0.6
File Size Uploaded Provenance
django_fieldsets_with_inlines-0.6.tar.gz 4.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-fieldsets-with-inlines 0.6
File Interpreter ABI Platform
django_fieldsets_with_inlines-0.6-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / django_fieldsets_with_inlines-0.6.tar.gz

Download URL django_fieldsets_with_inlines-0.6.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dec73d0d91f238906c93a7b99c545167a8ab0cc98f8af202d01df0cfc32a71cb
BLAKE2b-256 checksum
How to use checksums
1c71d4c5e0ac11afd144e4842598c706901dc5d66a62ab37f8a9c87b6b410c40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.0

Release files / django_fieldsets_with_inlines-0.6-py3-none-any.whl

Download URL django_fieldsets_with_inlines-0.6-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26eb222ef96a009c6a9ef301c8c906d8314c557a9814fc8bdaaa0ac22728580d
BLAKE2b-256 checksum
How to use checksums
0c75c9082217ee0fc6e7cad6a6393ef25ccea25bfc48a0e157e936543771e027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.0

Security for django-fieldsets-with-inlines 0.6

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.

Release history Release notifications | RSS feed

This release

0.6 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page