开发者

How to have previous and next button in the django admin (change_form)

I want to modify the django admin for a particular model to provide the following behaviour.

A user make a search on the change_list page. The the user click a specific entry and he lands on the change_form for that entry. Nothing开发者_如何转开发 different to the usual.

Now, what I want is a mean to navigate the former search results. Basically next and previous buttons on the edit page.

What would be the best approach to implement this feature without modifying the admin site too much?

I will need to memorize the search in the user session, then when an entry is clicked I will need to known which place it has within the results to place my "cursor" accordingly. But I'm a bit in the cloud as the implementation side.


One way is to just put the next and previous button in the template for that particular model. This can be implemented using simple javascript.


I ended writing a fully custom admin for that.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜