django-jet icon indicating copy to clipboard operation
django-jet copied to clipboard

How Make Inlines In One Page

Open ramses132 opened this issue 7 years ago • 3 comments

How can I make Admin form Inline Stacked or tabular in same form page? Thanks!

Normally It's appear in other page I need all my inlines in same general page :/ How can I make it?

ramses132 avatar Jun 13 '17 21:06 ramses132

I believe that by deault is not possible, is the Jet way.

SalahAdDin avatar Jun 14 '17 23:06 SalahAdDin

Please come to the django-jet Discord server so we can organize if you like:

  • https://discord.gg/3yr5yeH

Welcome! 😄

Ismael-VC avatar Aug 15 '17 15:08 Ismael-VC

Hi all, i know this is an old issue, but may be someone come across this issue and wonder the solution, i have a quite hackish way to overcome this.

just define custom css for curent model admin:

class Media:
        css = {
            'all': (
                'css/admin.css',
            )
 }

and create css accordingly with this:

.form-row .inline-group {
    margin-top: 30px;
}

.changeform-tabs ~ .module.selected, .changeform-tabs ~ .inline-group.selected {
    display: block !important;
}
body.change-form #content-main>form>div>.module.initialized, body.change-form #content-main>form>div>.inline-group.initialized {
    display: block!important;
}
.changeform-tabs-item:last-child {
	display: none;
}

hope this help

lantip avatar Nov 21 '20 07:11 lantip