djangosnippets.org: Latest snippets tagged with 'pyconuk2008'https://djangosnippets.org/tags/pyconuk2008/2008-09-13T05:35:43.339956-05:00Orderable inlines using drag and drop with jQuery UI
2008-09-13T05:35:43.339956-05:00simonhttps://djangosnippets.org/snippets/1053/<p>An easy way of making inlines orderable using drag-and-drop, using <a href="http://ui.jquery.com/">jQuery UI's</a> sortable() plugin.</p>
<p>First, add an "order" field to the inline models which is an IntegerField, and set that model to use 'order' as its default order_by.</p>
<p>Then hook in the JavaScript. This should make them drag-and-drop sortable using …</p>
Freely redistributable