How do you save the order of a django inline formset?

Viewed 5765

In Django, I'm using an inlineformset with can_order = True, on a model that has order_with_respect_to set. I've set up drag and drop on the front end, which results in Django's autogenerated ORDER form fields (which I've hidden) changing to reflect the new order. I've verified I'm POSTing the new order correctly to the server, but Django seems to ignore it, and saves the models in the original order. The automatically-created _order fields in the database never change.

How can I get Django to save the models using order specified in the formset? Do I need to do anything special other than calling save() on the formset?

2 Answers
Related