Open lorenzo33 opened 7 years ago
This is a duplicate of #363 , to fix it https://github.com/sshwsfc/xadmin/blob/master/xadmin/plugins/inline.py#L432 change the list to an OrderedDict
Could you give me an example ? Where do you change the list to OrderedDict ? In my adminx.py ?
Thanks for your help !
I did a fork and made some fixes, including this issue. This is the change I made https://github.com/rpalacios/xadmin/compare/master@%7B1480329670%7D...master
In inline.py, line 432. Make it fs = OrderedDict([...])
. Then add from collections import OrderedDict
at the top.
Using a list retains the order but not placement. Using a dict retains placement but not field order, using an OrderedDict does both.
Thanks for help. I use the frmdstryr's solution and it's work !
2016-12-28 16:40 GMT+01:00 frmdstryr notifications@github.com:
In inline.py, line 432. Make it fs = OrderedDict([...]). Then add from collections import OrderedDict at the top.
Using a list retains the order but not placement. Using a dict retains placement but not field order, using an OrderedDict does both.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sshwsfc/xadmin/issues/368#issuecomment-269494154, or mute the thread https://github.com/notifications/unsubscribe-auth/AXpcHRE4_o97BOJCqYyFx2EAWr0Cw2pUks5rMoLmgaJpZM4LWaTI .
-- Cdt
DELAPLACE Laurent
Here's my configuration :
I would like to display an inline formset in tab like the xadmin-demo-master.
Unfortunately, the Inline formset "City" appear out of the tab 'Cities' and appear under each tab.