开发者

admin panel recent actions

I was wondering if I can get django adm开发者_StackOverflow中文版in (logged as super user) to display in some kind of "recent actions box", changes other users (non super users) made?

Thanx,

Luka


LogEntry.objects.log_action()

http://www.djangosnippets.org/snippets/1052/

Tying in to Django Admin's Model History


it was my problem too, and it has a simple answer Just go this address and do the following; Address: your virtulenv/lib/site-packages/django/contrib/admin/templates/admin

And find base.html, inside of this file edit after {% load Log %} and simply add this :

{% if user.is_superuser %}
    {% get _admin_log (numbers of actions you want) as admin_log %}

And for the else do the same but at the end don't forget to add for_user user

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜