开发者

How to add a second changelist_view to a django model

开发者 https://www.devze.com 2023-01-04 00:38 出处:网络
The changelist_view is great for editing certain fields for many entries, so I thought about adding multiple views to my admin interface, each for different fields but I\'m not really sure what would

The changelist_view is great for editing certain fields for many entries, so I thought about adding multiple views to my admin interface, each for different fields but I'm not really sure what would be the best way...开发者_Go百科 did anybody do that before ?


You could have two differently configured Admin's for the same model, though there is a little tweaking need to make it work. Look the example here: http://www.mahner.org/posts/separating-staff-and-user-accounts-in-djangos-admin/. You wouldn't have to define different querysets for the two admin classes, but different options for the ModelAdmins!

0

精彩评论

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

关注公众号