google-code-export / django-mptt

Automatically exported from code.google.com/p/django-mptt
Other
0 stars 0 forks source link

TabularInline fails with admin #69

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I use this for menu items (fk to self, to get levels)

I have a class MenuItemInline(admin.TabularInline) and use it in
class MenuItemAdmin(admin.ModelAdmin) like inlines = [ MenuItemInline ]

Problem is that the menu items end up in reverse!

The relevant fields would be order and name, and I have
order_insertion_by=['order'] which may be redundant, I'm not sure.
I was thinking this bug might go away if I try to enforce ordering
that way.

As far as I could tell, the problem is that mptt makes space at the
same level for every new object, instead of figuring out a new place
where to create space, so it shifts the last inserted node with everyone
else, causing them to end up reversed.

Original issue reported on code.google.com by markus.t...@gmail.com on 12 Feb 2010 at 11:17

GoogleCodeExporter commented 9 years ago
Migrated to https://github.com/django-mptt/django-mptt/issues/#issue/92

Original comment by craig.ds@gmail.com on 19 Dec 2010 at 1:09