我是 Python 和 Django 开发的新手。我正在尝试制作一个简单的博客。
现在我想做的是创建一个管理员功能来显示管理员尚未批准的评论。我喜欢向管理员展示评论并提供接受或拒绝选择。
问题是,我不知道步骤。我在网上进行了一些搜索,但找不到我们要找的东西。执行此操作的步骤是什么?我需要学习什么才能做到这一点?
如何添加自定义列表、按钮和功能?我什至不知道在哪里为我的自定义管理功能编写代码。
Ps:我不是找人给我写代码。我只是在寻找指导方针。
请您参考如下方法:
我建议使用 django-admin-plus ( https://github.com/jsocol/django-adminplus ),它完全符合您的要求:
AdminPlus aims to be the smallest possible extension to the excellent Django admin component that lets you add admin views that are not tied to models.
All AdminPlus does is allow you to add simple custom views (well, they can be as complex as you like!) without mucking about with hijacking URLs, and providing links to them right in the admin index.
