django:有没有办法从管理站点“导入”功能?

时间:2016-08-31 16:38:54

标签: django django-admin

我正在尝试构建自己的网站,但真的很羡慕管理员提供的一些功能,比如模型更改历史记录,用户组身份验证,登录和内容。我假设应该有一个简单的方法从管理员移植所有这些,因为他们已经在那里。

1。 例如,django是否记录了模型的特定实例的更改历史记录,就像我们在管理员中所拥有的那样,以便我可以调用它?

2。 Django是否内置了用户和组身份验证系统,就像我只是在表单上放置标签来指定哪些用户组可以编辑它?

1 个答案:

答案 0 :(得分:1)

Sure you can get all the functionality that Django admin has.

  1. That's how actions history is displayed in template: link. This what action_list is, that is rendered in template: link. And finally, LogEntry model is fully described in django.contrib.admin.models.
  2. As the first point is described, you can find the information about authentication, as @user2976657 pointed you can find it in the docs, or run through source code
相关问题