![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Here's an example of making an admin page that lets people reorder the items through drag and drop. It's *fairly* genericized already--you can use the same template for multiple data types--and has the potential to be MORE generic by creating a generic view sort of thing, but I haven't done that yet.
All you need is a model that has a (Integer or PositiveInteger) field named 'order'.
The form will let you reorder the items by drag and drop and save them, and also lets you link to the usual form to add an item.
( This way to the code! )
All you need is a model that has a (Integer or PositiveInteger) field named 'order'.
The form will let you reorder the items by drag and drop and save them, and also lets you link to the usual form to add an item.
( This way to the code! )