开发者

How to add a custom method to Django's Admin Console?

Ok, so in our employee database, we keep a list of all employees and we get this information contained within a data file that is produced by our HR system. The script to truncate the table and populate it with the employee information is done and works nicely. However, I would like the method call to do this from within the application. I thought it would be best to add it to the Admin console since only superusers are allowed to do this. So, is there a way to add a method/link to the console that is not directly model/data r开发者_开发百科elated?

Thanks! Eric


Override the app_index.html admin template (see documentation) and add the url to your view.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜