django-jet
django-jet copied to clipboard
How Make Inlines In One Page
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?
I believe that by deault is not possible, is the Jet
way.
Please come to the django-jet Discord server so we can organize if you like:
- https://discord.gg/3yr5yeH
Welcome! 😄
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