I find some problem when delete items in django admin UI, steps to repro:
but if I go into one item, and try to delete the item from there, then there is no problem.
my code :
name = models.CharField(max_length = 200)
slug = models.SlugField(max_length = 200)
parent = TreeForeignKey('self', null = True, blank = True, related_name = 'children')
order_insertion_by = ['name']
django : 1.3.1
mppt : 0.5
backend : mysql
os : mac os x
Right, mptt doesn't currently do anything with queryset updates/deletes because arbitrary lots-of-rows mptt updates are difficult to solve efficiently. This is something I'd like to fix but haven't had the time to work on a patch.
The implementation of a fix is probably not simple. As a workaround, you could override the delete_selected action in the admin to do a full tree rebuild. That's not nice either but it'll keep the database consistent.
So why is this issue closed, then? As far as I undestand this is still an open issue in the current version...
Btw. see http://stackoverflow.com/q/5591893/171579 for an example of how to disable / override the delete_selected action as a workaround.
Yes, it is still an issue, so fair enough
For later reference.
Adding disable_mptt_updates around the deletion:
Replacing the default delete_selected action:
Update MPTT properties also when bulk deleting issues through the adm…