开发者

Quickly implement a sortable table of objects in Django

开发者 https://www.devze.com 2022-12-23 00:52 出处:网络
Hey all. I have a question on how to implement the following with Django. I\'d like to display a tabular view of my objects with each column corresponding to a particular model field. I\'d like to be

Hey all. I have a question on how to implement the following with Django. I'd like to display a tabular view of my objects with each column corresponding to a particular model field. I'd like to be able to have the user sort the columns or search through all of them. Basically just like the admin, but client facing and read-only. It's simple, but I was wondering if there was a way I could implement this without having to write all that logic from scratch.开发者_JAVA技巧


Alex Gaynor's django-filter may be what you want.


Depending on how much you wanted to work with it, Yahoo YUI's DataTable control is pretty easy to get working with a JSON data source. See http://developer.yahoo.com/yui/datatable/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号