Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Failed to load latest commit information.
css
js
README Updated Readme

README

Django does not allow collapsible inlines.

To enable collapsible inlines, include the js and css into your admin media for the admin class.

class MyAdmin(admin.ModelAdmin):
    inlines = [inline1, inline2, ...]

    class Media:
        css = {
            'all': [
                "%scss/django_admin_collapsed_inlines.css" % settings.STATIC_URL,
            ]
        }

        js = [
            "%sjs/jQuery.js" % settings.STATIC_URL,
            "%sjs/django_admin_collapsed_inlines.js" % settings.STATIC_URL,
        ]


The above js and css works for both TabularInline and StackedInline.
Something went wrong with that request. Please try again.