开发者

Overriding the Index view of class AdminSite for Django admin?

I need to Ove开发者_开发百科rride the def index(self, request, extra_context=None): view to perform some extra functionality but have no idea how/where do I make a class and inherit class AdminSite and override the view to just perform extra functionality. I dont need anything else to be changed but just want to override this view.

Thanks Anks


I don't know the need to overriding or extending the admin index view but i guess its fair to show something custom while showing the admin index page, If you want to add a couple of links of your own which looks neat and nice then django-admin-tools and django-grappelli will accomplish that. I've never tried it myself but there is a post i've seen few days back on google groups where a guy overrides/extends the admin index view with his own in admin.py.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜