0๐
โ
I found that django-baton template does support custom form tab and i managed to get 3 inlines in a single tab
https://django-baton.readthedocs.io/en/latest/form_tabs.html
inlines = [
UserKycInline, UserWalletInline, UserBankInline, CardBindingInline, TopUpsInline, TransfersInline, WithdrawalsInline,
]
fieldsets = (
('General', {
'fields': ('id', 'uid', 'phone_number', 'nickname', 'status', 'eth_address', 'evt_address', 'created', 'modified',),
'classes': ('baton-tabs-init', 'baton-tab-group-fs-kyc--inline-userkyc', 'baton-tab-group-fs-wallets--inline-user_wallet', 'baton-tab-group-fs-banks--inline-user_bank', 'baton-tab-group-fs-cards--inline-user_binding', 'baton-tab-group-fs-transactions--inline-user_toptup--inline-transfers--inline-user_transfer--inline-user_withdrawal', ),
}),
('KYC', {
'fields': (),
'classes': ('tab-fs-kyc', ),
}),
('WALLETS', {
'fields': (),
'classes': ('tab-fs-wallets', ),
}),
('BANKS', {
'fields': (),
'classes': ('tab-fs-banks', ),
}),
('CARDS', {
'fields': (),
'classes': ('tab-fs-cards', ),
}),
('Transactions', {
'fields': (),
'classes': ('tab-fs-transactions', ),
}),
)
๐คLinh Nguyen
0๐
It is not possible with the standard django admin, I suggest you to try django-tabbed-admin.
๐คFabio Caccamo
0๐
You can try https://github.com/cuongnb14/django-admin-extended. Just install follow instructions at https://github.com/cuongnb14/django-admin-extended#readme
Default it slipt each inline model to one tab, if you want all inline models to only one tab you can modify code at admin_extended/templates/admin/change_form.html. It uses jquery-ui and you can easy to do it. Image demo
๐คJayce
- [Django]-Errors When Installing MySQL-python module for Python 2.7
- [Django]-How do I send XML POST data from an iOS app to a Django app?
- [Django]-How can I disable/remove authorize button in swagger drf_yasg (maintain CSRF) โ django
- [Django]-Django on Aptana Studio 3.0
- [Django]-Django log errors and traceback in file in production environment
Source:stackexchange.com