使用拖放和拖放重新排序项的模型 [英] Re-ordering entries in a model using drag-and-drop
本文介绍了使用拖放和拖放重新排序项的模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
最好不要在模型中添加任何额外的字段,但是如果我真的需要我可以。
解决方案
对于工作代码执行此操作,请查看片段1053 , djangosnippets。 org
Say I have a blogging app in Django. How can i re-order the posts using a draggable table in the default admin?
It would be best if i didn't have to add any extra fields to the model, but if i really have to i can.
解决方案
For working code to do this, check out snippet 1053 at djangosnippets.org.
这篇关于使用拖放和拖放重新排序项的模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文